Blog Archives

Sweave vs. pgfSweave

April 28, 2010
By
Sweave vs. pgfSweave

I think pgfSweave should replace the default of Sweave system because it brings significant improvements over the original Sweave. I certain have made it my default Sweave tool on my system.------------------------------- EDITED ON MAY 1, 2010 --------...

Read more »

Trouble with ESS and Sweave

April 23, 2010
By
Trouble with ESS and Sweave

Last time I tried to sweave a document from with Emacs+ESS, I was using an earlier version of ESS (the current version is 5.8), and things seemed to be fine. Today when I tried to sweave a simple document and produced PDF output, I got error message of...

Read more »

GLMM using DPpackage

April 9, 2010
By
GLMM using DPpackage

I was able to fit a semi-parametric Bayesian GLMM model using DPpackage. It took me many hours to sample from the posterior distribution (DPM prior):MCMC scan 1000 of 5000 (CPU time: 18950.080 s)MCMC scan 2000 of 5000 (CPU time: 22510.100 s)M...

Read more »

Measuring the length of time to run a function

March 17, 2010
By
Measuring the length of time to run a function

This post describes how to time the run time of a R function.

Read more »

GLMM revisted

March 5, 2010
By
GLMM revisted

A short while ago, I reported some discrepancies between the results produced by "lme4" and other R packages as well as Stata. Today I upgraded to the most recent version of "lme4a" and re-ran my model. The error of false convergence disappea...

Read more »

An interesting paper

February 27, 2010
By
An interesting paper

Ben Bolker has an interesting paper (outline of a paper) comparing different approaches to estimate GLMM in R environment, which is very helpful to what I am doing right now.The paper pointed out the following options to fit GLMM using R:glmerglmmMLglm...

Read more »

Generalized linear mixed effect model problem

February 16, 2010
By
Generalized linear mixed effect model problem

I am trying to compare cohort difference in infant mortality using generalized linear mixed model. I first estimated the model in Stata:xi:xtlogit inftmort i.cohort, i(code)which converged nicely:Fitting comparison model:Iteration 0:   log likelih...

Read more »

Cure model using R

February 13, 2010
By
Cure model using R

The package "nltm" seems to be able to estimate proportional hazard and proportional odds cure models. I will do some experiments and see how it goes.

Read more »

Handling hierarchical data structure in R

February 11, 2010
By
Handling hierarchical data structure in R

R has a comprehensive set of tools for the handling of hierarchical data structure. The most widely used package is probably "nlme" and "lme4", contributed by Douglas Bates and colleagues. While "nlme" is older and probably more mature than "...

Read more »

Loglinear models using R

February 10, 2010
By
Loglinear models using R

For those sociologists who want to estimate complicated loglinear models (e.g. Goodman's RC model) using R, the package "VGAM" seems to be a good choice.

Read more »