[R-sig-ME] lme with ECLS

Kyle Roberts kyler at smu.edu
Fri Sep 5 16:51:06 CEST 2008


Using lmer, I got the same error that Sundar got on August 4. I am using
lmer_0.999375-24. Also, Doug, the C1_6SC0 is the ECLS weighting variable for
the 6th grade sample.

Thanks all,
Kyle

> m.null<-lmer(MATH~time + (time|CHILDID), data=ecls, na.action=na.omit,
weights=C1_6SC0, control=list(msVerbose=TRUE))
Error in mer_finalize(ans, verbose) :
  Calculated PWRSS for a LMM is negative
> 
> sessionInfo()
R version 2.7.1 (2008-06-23)
i386-apple-darwin8.10.1

locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] car_1.2-8          foreign_0.8-26     lme4_0.999375-24
[4] Matrix_0.999375-11 lattice_0.17-8

loaded via a namespace (and not attached):
[1] grid_2.7.1  tools_2.7.1


On 9/5/08 7:55 AM, "Doug Bates" <bates at stat.wisc.edu> wrote:

> 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