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

Doran, Harold HDoran at air.org
Thu Feb 1 17:24:54 CET 2007


Try adding this portion of code to your lmer model

control=list(gradient = FALSE, niterEM = 0)

This will change what you have below from 

lmer(math~ gr + sx + eth + cltype + (1+yrs|id) + (1+yrs|sch), data=star)

To

lmer(math~ gr + sx + eth + cltype + (1+yrs|id) + (1+yrs|sch), data=star,
control=list(gradient = FALSE, niterEM = 0))

BTW, you don't need (1+yrs) you can reduce this to just (yrs|id).

This should make a huge difference.

Harold


> -----Original Message-----
> From: r-sig-mixed-models-bounces at r-project.org 
> [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf 
> Of Kevin Wright
> Sent: Thursday, February 01, 2007 10:25 AM
> To: r-sig-mixed-models at r-project.org
> Subject: [R-sig-ME] Timings with SAMM, lme4, nlme
> 
> About a year and a half ago I did some comparison of model 
> fitting with SAMM, lme4, and nlme.  Since Doug Bates put out 
> a request for some recent timings, I am repeating/extending 
> my comparisons.  In the interim, I have switched computers, 
> so the timings of the samm function facilitate comparing the 
> speed across the two computers.
> 
> First, the results (view with fixed-width font)
> 
>            Setup   T30   D620    T30   D620     D620    D620
> Model \ Function  samm   samm   lmer   lmer    lmer2     lme
> ----------------  ----   ----   ----   ----    -----   -----
> yrs|id + yrs|sch     f      f   30.0   kill     65
> yrs|id +   1|sch  10.5    7.8   13.7   kill     23
>   1|id + yrs|sch   9.4    9.5   11.5   kill      7.3
>   1|id +   1|sch   6.5    5.7    5.6   kill      5.4      60
>          yrs|sch   4.8    4.0      f   kill      0.5
>            1|sch   3.4    2.2    0.4    0.7      0.3       4
> yrs|id             5.7    5.7    8.2   kill     15       150
>   1|id             4.1    3.4    2.4   kill      4.2      14
> 
> In the table above, "Setup" refers to the following two computer
> configurations:
> 
> T30:  IBM Thinkpad T30, 1 GB ram, 1.8 Ghz processor, Windows 2000
>       SAMM version 1.1, lme4 & nlme current on 5.24.2005
> 
> D620: Dell Latitude D620, 2 GB ram, 1.8 Ghz duo core processor, WinXP
>       SAMM version 1.1 lme4 & nlme current as of 1.30.2007
> 
> I timed most model fits only once.  I did a quick inspection 
> of the results from the different modelling functions to 
> persuade myself that I was fitting the same model (i.e. that 
> estimates were similar).
> 
> Here are the full models I used:
> 
> lmer(math~ gr + sx + eth + cltype + (1+yrs|id) + (1+yrs|sch), 
> data=star)
> 
> samm(math ~ gr + sx + eth + cltype, random=~ us(link(~1+yrs)):id +
>      us(link(~1+yrs)):sch, data=star, na.method.X="omit")
> 
> Starting with these full models, I tried reduced models with 
> simpler random effects structures.  These are the different 
> rows in the table above.
> 
> Observations:
> (1) The performance of the common version of SAMM on the two 
> computers suggests the Dell is slightly faster than the IBM.
> 
> (2) On 24 May 2005, lmer and samm has roughly similar 
> timings.  On 31 Jan 2007, lmer is nearly unusable for this 
> data (I killed the job after 5-10 minutes of waiting).
> 
> (3) The current version of lmer2 is the only function that 
> appears to fit all models.
> 
> (4) The current version of lme is slower than sammm/lmer2 for
>     those models I tried to fit.
> 
> FYI.  SAMM is officially available at
> http://www.vsni.co.uk/products/samm/(but seems not to be 
> there now, perhaps in preparation for release of a new 
> version). Unofficially it is available here: ftp://ftp.dpi.nsw.gov.au/
> 
> I hope this information is useful.  Thanks for the progress 
> evident in the
> lme4 package.
> 
> Kevin Wright
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>




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