[R] Question on mixed effect models with LME

Peter Flom peterflomconsulting at mindspring.com
Wed Oct 21 19:06:58 CEST 2009

Good afternoon

Using R 2.9.2 on a machine running Windows XP

I have a longitudinal data set, with data on schools and their test scores over a four year period.  I have centered year, and run the following

m1.mod1 <- lme(fixed = math_1 ~ I(year-2007.5)*TFC_,
               data = long,
               random = ~I(year-2007.5)|schoolnum,
               na.action = "na.omit")

where math_1 is a percentage of students in a given school that are at the lowest math achievement level, year is year, TFC_ is a categorical variable for a treatment I wish to evaluate, and schoolnum is an identifier.

When I run summary on this model, I get a strong negative correlation (-0.91) between the intercept and I(year-2007.5), despite the fact that the mean of year is 2007.5.  

I am puzzled, as I thought centering the time variable should eliminate, or at least strongly reduce, this correlation.

Any insights appreciated



Peter L. Flom, PhD
Statistical Consultant
Website: www DOT peterflomconsulting DOT com
Writing; http://www.associatedcontent.com/user/582880/peter_flom.html
Twitter:   @peterflom

More information about the R-help mailing list