[R] LMER vs PROC MIXED estimates

Ben Bolker bbolker at gmail.com
Wed Nov 7 15:11:05 CET 2012


sandip1006 <sandip.1006 <at> gmail.com> writes:

> 
> 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. Also, I would take
> your suggestion and post this in Mixed Models SIG.

  Let me also point out that you will save a bit of time if you can
provide a *reproducible* example (see
e.g. http://tinyurl.com/reproducible-000 ), and full context, when you
post to r-sig-mixed-models .  Looking at your SAS and R code, nothing
jumps out as odd, so you will probably have to post more details in
order to get an answer ...
  Data sets don't always attach properly, using dput() is best if
you can.

  Ben Bolker




More information about the R-help mailing list