[R-sig-ME] lme with ECLS

Douglas Bates bates at stat.wisc.edu
Fri Sep 5 14:55:28 CEST 2008


On Thu, Sep 4, 2008 at 3:31 PM, Roberts, Kyle <kyler at mail.smu.edu> wrote:
> Friends,

> I am running the ECLS dataset with lme (long story on why I couldn't use lmer; mostly political) and am having trouble.  Here's the model:

> m.null<-lme(MATH~TIME, random=~TIME|CHILDID, ecls, na.action=na.omit, weights=varFixed(~C1_6SC0))

> When I ran the model without the weighting variable, it converged in about a minute (~17000 kids on 4 measurement occasions). But with the weights the thing has been running for about 24 hours without coming to a solution.

The first thing to try is adding control = list(msVerbose = TRUE) in
the call to lme.  I would be interested in whether the difference in
running time is due to a change in the time per iteration or due to a
huge increase in the number of iterations, indicating that lme is
failing to converge.

What should be happening is that the response and the model matrices
are "pre-whitened".  That is, they are multiplied by the square root
of the weights.  That shouldn't cause such an extreme difference in
running times though.

Did you try fitting the equivalent models using lmer?  That type of
model and size of data set shouldn't take very long and it would give
you a reference fit.  One thing to watch for is whether the weighted
fit corresponds to a singular covariance matrix for the random
effects.  A big difference between lme and lmer is that lmer works
with the factor of the covariance matrix whereas lme works with the
factor of the precision matrix, which is the inverse of the covariance
matrix.  Check for lmer fits giving estimates of the correlation of
the random effects near -1 or +1.  If you use the optional argument
verbose = TRUE in lmer you will see that there are three parameters in
the optimization and you want to watch for one of the first two (most
likely the second) parameter getting close to zero.

I presume that the ECLS data are the "Early Childhood Longitudinal
Program (ECLS)" data described at http://nces.ed.gov/ECLS/index.asp
(apparently named by people who haven't quite grasped all the
subtleties of acronym construction).  Just out of interest, what is
the variable C1_6SC0?




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