[R-sig-ME] Timings with SAMM, lme4, nlme

Douglas Bates bates at stat.wisc.edu
Fri Feb 2 18:55:34 CET 2007


On 2/2/07, Kevin Wright <kw.statr at gmail.com> wrote:
>
> (1) In short, I can find essentially no difference in the results of the
> samm and lmer models (the most complex one that both functions could
> handle):
>
> lmer: math~ gr + sx + eth + cltype + (1+yrs|id) + (1|sch)
>  samm: math ~ gr + sx + eth + cltype, random=~ us(link(~1+yrs)):id + sch
>
> After several hours searching through the return values of the two functions
> (slots, S3 methods, S4 methods, extractors and all that) and identifying
> unique approaches (lmer uses polynomial contrasts for ordered factors and
> samm uses treatment contrasts; missing values in the data are handled
> slightly differently in the way the random effects return values are
> presented), I find the two functions have nearly identical variance
> components and essentially identical fixed effects and random effects.  An R
> transcript is attached for reference.
>
> (2) Yes, SAMM is proprietary.  It is available on Windows and Linux, S-Plus
> and R.  The developer has told me that version 2 is very near completion.
> If you ever want to try it out, there is a 30-day free trial before it stops
> working.
>
> I use lme4 because it is open-source and has a good community of users,
> published examples, etc.  I use samm to analyze data from plant breeding
> experiments (current literature methods use large data sets, crossed random
> effects, heteroskedasticity, spatial correlation, etc.).  SAMM also has
> convenient reporting of linear predictions of BLUEs/BLUPs (Welham , Cullis,
> Gogel, Gilmour, & Thompson 2004, Stroup & Mulitze 1991) for decision-making.
>  I also use both because fitting the same model using two different software
> packages (when the software capabilities allow for it) really helps me think
> carefully and hard about what I'm asking the software to do, what it
> actually does, and what the results actually mean.
>
> Thanks for the challenging question...I learned more because of it.

Thanks for the response, Kevin.  The reason that I suggested comparing
models with random effects for students, teachers and schools in the
star data is because incorporating random effects for teachers will
more clearly expose differences between partially crossed random
effects and implicitly nested random effects.  I would try to fit
something like the enclosed model fit then check for consistency in
the estimates of the variance-covariance matrices of the random
effects, the log-likelihood, etc.




More information about the R-sig-mixed-models mailing list