[R-sig-ME] Links to that "slow" lmer example I asked about
Paul Johnson
pauljohn32 at gmail.com
Tue Oct 6 21:57:48 CEST 2009
Dear Everybody:
I asked a couple of weeks ago about the puzzle that my colleague's
linear mixed model can be estimated in HLM6 in 3 seconds, while lmer
requires about 50 seconds. I wondered if that was expected/known.
The discussion seemed to end with the conclusion "if you expect us to
evaluate that, give us the working example." Due to a death in my
family, I was delayed in responding, but here are the links to the
example data and code.
The data frame is saved with R's write function
http://pj.freefaculty.org/R/MixedModel/myframe.Rdata
I believe that is workable on all platforms. That's about 26,000 rows.
Variable V33 represents the groups (in this case, country). The
variables are generically named V1-V33.
The small simple test program to load the data and estimate the model:
http://pj.freefaculty.org/R/MixedModel/replicateMM.R
The output I get, which has system.time wrapped around the use of lmer:
http://pj.freefaculty.org/R/MixedModel/replicateMM.Rout
I get
## user system elapsed
##55.448 0.216 55.756
Please remember I am not saying that lmer should work faster. I
understand it is capable of estimating models that other programs
cannot. I'm only trying to explain to a user why this one linear
model takes more time in lmer than in HLM6.
pj
--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas
More information about the R-sig-mixed-models
mailing list