Hi All

`I'm working with a 2-level model (I have teachers within schools); I'm
``using xtmixed to examine this nested model.
`

`Upon a reviewer's insightful suggestion I added a level-2 covariate to
``my model (tch_mean). Owing to my own insomnia, I mistakenly assumed
``this was a level 1 variable and decided to check to see if there was
``significant variation if I added a random component to this
``coefficient into the model. Lo-and-behold there was. Now I've
``regressed into a little ball of confusion trying to understand why
``this is.
`

`At first I thought I made a moronic mistake (which, I'm aware, may
``still be the case). Two nuggets indicate I may not have. One, stata
``didn't crash or kick out an error when I asked it to allow a level 2
``variable to vary - so apparently it is computationally feasible
``(though it may not be sensible). The second nugget of hope comes from
``the help file within xtmixed. In this file, the first example of a
``random coefficients model is one where the coefficient that varies has
``no level 1 variation. The syntax they use is parallel to my own.
`

`I'm investigating this point because the results generated with this
``level 2 variation are much more interesting than without this
``variation (it changed the magnitude and increased the significance of
``some other level 2 variables). My current understanding of the random
``component doesn't leave any room to accommodate how my situation can
``be explained. I had thought that there needed to be variation within
``the level 1 cluster to allow for a random component (and the level 2
``variables are used to predict the school-specific intercepts). Any
``thoughts you have would be greatly appreciated.
`
Here's the code from the example in the stata help file:
Setup
. webuse nlswork

` Random-intercept and random-slope (coefficient) model, correlated
``random effects
`` . xtmixed ln_w grade age c.age#c.age ttl_exp tenure
``c.tenure#c.tenure || id: grade, cov(unstruct)
`
My code:

`. xtmixed gap diff2 tdbkgd3a tch_mean sd pd_gender pdyradm pdyrtch
``pdyrsch enroll_07 econdis_07 tcap_ssm_08 ///
` || prinid: tch_mean, mle cov(un) var
where prinid identifies schools.

`I'm having trouble understanding why this is a methodologically sound
``approach (if I'm correct in inferring this from the similar example
``within the help file). How is giving a level 2 covariate a random
``component understood within a 2-level model?
`

`My second question will likely be explained through an understanding
``of the above, but I'd also like to know why/how allowing this level-2
``to have a random component so drastically changes my other level-2
``variables (at least 3 of them). How do I interpret the other level-2
``variables in light of the significant random variation of tch_mean?
`
Kind thanks for your insights,
~PG
Peter Trabert Goff
PhD student
Department of Leadership, Policy, and Organizations
Vanderbilt University
Peabody #514
230 Appleton Place
Nashville, TN 37203-5721
Tel. 615-415-7844
Fax. 615-322-6596
peter.t.goff@vanderbilt.edu
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/