[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: AW: xtmixed: baffling random component |

Date |
Thu, 17 Dec 2009 17:29:20 +0100 |

<> "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." Not sure what you mean by that. Your "level 1" is, in terms of -h xtmixed-, the "fe_equation", i.e. the fixed-effects part of the model. And sure enough, "grade" does appear there, so it is accounted for on your "level 1". There is not supposed to be any variation there, though - hence the name "fixed effects". The first time variation for a coefficient even enters the picture is on your "level 2", which the help file calls "re_equation", following the double pipe symbol. HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Peter Goff Gesendet: Donnerstag, 17. Dezember 2009 17:20 An: statalist@hsphsun2.harvard.edu Betreff: st: xtmixed: baffling random component 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/ * * 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/

**References**:**st: xtmixed: baffling random component***From:*Peter Goff <peter.t.goff@vanderbilt.edu>

- Prev by Date:
**Re: st: AW: Problem with xtivreg2** - Next by Date:
**st: excess odds ratio** - Previous by thread:
**st: xtmixed: baffling random component** - Next by thread:
**st: excess odds ratio** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |