Re: [R] question about cumulating random effects in lmer

2006-04-24 Thread Dieter Menne
zhongmiao wang zhongmiao at gmail.com writes:

 I am studying the effect of schools on student achievement growth over
 time. School effect is random. The effects of schools in prior years
 are assumed to be persistent till the current year. Thus, the total
 school effect in the second year is like J=J2+J1. Does anyone know how
 to model this kind of cumulating random effects in lmer? Thanks in
 advance!

Compute new variables with the cumulative effect of the previous years and use 
these instead of J2, J1. If there are not too many years, using reshape to 
make a wide version of the data frame, and then adding up within a row is 
probably the most transparent way to do this.

Dieter

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] question about cumulating random effects in lmer

2006-04-23 Thread zhongmiao wang
Hello:
I am studying the effect of schools on student achievement growth over
time. School effect is random. The effects of schools in prior years
are assumed to be persistent till the current year. Thus, the total
school effect in the second year is like J=J2+J1. Does anyone know how
to model this kind of cumulating random effects in lmer? Thanks in
advance!

Best Regards
Zhongmiao Wang

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html