[R] LMER vs PROC MIXED estimates

David Winsemius dwinsemius at comcast.net
Wed Nov 7 09:57:34 CET 2012


On Nov 6, 2012, at 11:38 PM, sandip1006 wrote:

> Hi David,
> 
> Thanks for the reply. sorry for typo in the R script ...what I meant to
> write was
> testdata <- read.csv("adstest.csv",header=TRUE,sep=",") 
> attach(testdata) 
> library(lme4) 
> options(contrasts = c(factor = "contr.SAS",ordered = "contr.poly")) 
> lmm.2=lmer(y~X1+X2+X3 + (X2|Geography),REML=TRUE,data=testdata)
> 
> not sure if attaching the dataset causes any problem.

I'm not _sure_ either, but I would definitely advise detach()-ing it. You should not need to attach when you are also passing testdata to the data argument.


> Also, I would take
> your suggestion and post this in Mixed Models SIG.
> 
> Regards,
> Sandip
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/LMER-vs-PROC-MIXED-estimates-tp4648653p4648671.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.

David Winsemius, MD
Alameda, CA, USA




More information about the R-help mailing list