On Thu, May 3, 2012 at 11:50 PM, Mohammed Mohammed <m.a.moham...@bham.ac.uk> wrote: > Hi folks > > I am using the lmer function (in the lme4 library) to analyse some data where > individuals are clustered into sets (using the SetID variable) with a single > fixed effect (cc - 0 or 1). The lmer model and output is shown below. > Whilst the fixed effects are consistent with stata (using xtmixed, see > below), the std dev of the random effect for SetID is very very small > (3.5803e-05)compared to stata's (see below 1.002). Any ideas why this should > be happening please....? >
You're not fitting the same model. Like SAS, Stata by default assumes that random effects are independent of each other, so your Stata model has correlation between the random effects forced to zero. The R model estimates the correlation, and finds it to be far from zero (-0.69). -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.