Jonathan Weeks
2008-Mar-14 01:01 UTC
[R] Equation for the standard error of a predicted score for a cross-classified model
All, I have several years of longitudinal test scores for students (many who switch schools at various points in time). I am using a mixed-effects model with crossed random effects to model student trajectories. The model includes time at level 1 and students crossed with schools at level 2. When I run the model I get the posterior variances on the intercepts and slopes for students and schools, but I am trying to figure out how to combine these variance components to determine the standard error for each student's predicted score at a given point in time. Say, for a given student pi = posterior variance for their intercept ps = posterior variance for their slope si = posterior variance of the intercept for the school the student was in at time t ss = posterior variance of the slope for the school that the student was in at time t This is what I'm currently thinking SE = sqrt(pi+si+(t-x)^2(ps+ss)) where t = time and x = mean number of observations across all students. Any help anyone can offer would be greatly appreciated. -- Jonathan Weeks Doctoral Candidate School of Education University of Colorado, Boulder weeksjp@gmail.com 303-517-9666 [[alternative HTML version deleted]]