[R] Trends for many units

s-luppescu@uchicago.edu s-luppescu at uchicago.edu
Mon Jan 8 16:53:06 CET 2001


On 05-Jan-2001 Prof Brian D Ripley wrote:
> Wouldn't you expect two grades in one school to be more similar than two
> grades in different schools?  And would not slopes for different grades
> in one school be more similar than across schools?  Those translate into
> dependence.

Yes, indeed, but I wasn't anticipating estimating all effects at the same time.
What I have done before with this type of problem in SAS is to estimate
parameters for one unit at a time, and doing the recalculation of the weights
and the iteration manually (in a macro loop), so between unit dependence is not
an issue.

> For an lm-type model you can circumvent this by treating all the
> school-grade combinations as fixed effects.  Thus
> 
> (r)lm(Pct.Excl ~ Unit*Grade*Year)
> 
> (and I would centre Year on 1998) fits 3520 lines with a common assumed
> error variance. That's a lot of parameters to fit in one go, and you will
> probably find lmList in package nlme helpful.  But my suggestion for a
> model is
> 
> i Unit
> j Grade
> t Year
> 
> y_{ijt} = mu + beta_j + gamma * t + eta_i + zeta_{ij} + epsilon_{ijt}
> 
> eta, zeta, epsilon iid with common variances in each group.
> 
> that is fixed effects for Grade, random effects for Unit and Unit | Grade.
> You may or may not need additional random effects
> 
> lambda_i * Year + kappa_{ij} * Year
> 
> As set up here, independence of all the rvs is plausible, but lme does not
> require it.  The predict.lme will give you BLUP lines for each Unit-Grade
> combination, and they will not be the fitted values in the fixed-effects
> model.  Most social statisticians I know (and we have have some local
> stars) think that the second is more valuable, and routinely use it.
> 
> Snijders, T.A.B. and Bosker, R.J. (1999) Multilevel Analysis. Sage.
> 
> have an example of IQ tests adminstered to students in classes in schools
> done in exactly this way.  (And that was the ref the experts recommended
> for social applications.)

Thank you very much for the very valuable help (as always).
______________________________________________________________________
Stuart Luppescu         -=-=-  University of Chicago
$(B:MJ8$HCRF`H~$NIc(B        -=-=-  s-luppescu at uchicago.edu
http://www.consortium-chicago.org/people/sl.html
Finger sl70 at musuko.uchicago.edu forPGP Public Key
ICQ #21172047  AIM: psycho7070
History tends to exaggerate.
                -- Col. Green, "The Savage Curtain", stardate 5906.4
>> Sent on 08-Jan-2001 at 09:49:27 with xfmail
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list