Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Obtaining level 2 coefficients in multilevel models
From
Owen Gallupe <[email protected]>
To
[email protected]
Subject
st: Obtaining level 2 coefficients in multilevel models
Date
Thu, 1 Aug 2013 02:55:22 -0400
Hi Statalist,
I’m a little embarrassed to be asking this because I’m sure the answer
is readily available somewhere, but I haven’t been able to find it.
I have some experience with basic multilevel modeling but mostly as a
way to address cluster sampling without really examining effects
across the various levels of data. Moving beyond that, my question is
this: How do you produce level 2 regression coefficients? In other
words, I am hoping to find out how to get a level 2 regression
coefficient that is analogous to a level 1 regression coefficient.
Let me clarify with an example: I have data on ~6000 students
clustered within 63 high schools and I wanted to look at the
relationship between individual-level college opportunities (the DV)
and a) individual SES (level 1 IV), b) school SES (level 2 IV)
(controlling for grades and sports participation). How do I test
whether the average school-level SES is related to individual-level
college opportunities (e.g., "being in a school with higher mean SES
makes it likely that students will have more college opportunities")?
It seems to me that this would be the average slope across clusters?
Unless I am misinterpreting it, the random intercept/random slope
correlation doesn’t get at the question I have. In the output below,
that correlation means that the relationship between SES and college
opportunities is stronger in schools with lower mean levels of college
opportunities (i.e., steeper positive slope in schools with a lower
intercept). But I want to know whether there is an effect on
individual-level opportunities to attend college of attending a high
school with greater or lesser mean levels of SES.
xtmixed collopp grades sports ses || schoolid: ses, cov(unstructured)
Mixed-effects ML regression Number of obs = 5905
Group variable: schoolid Number of groups = 63
Obs per group: min = 35
avg = 93.7
max = 608
Wald chi2(3) = 840.51
Log likelihood = -13373.671 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
collopp | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
grades | .12301 .0244538 5.03 0.000 .0750814 .1709385
sports | .2269476 .0083946 27.03 0.000 .2104944 .2434008
ses | .2774569 .048012 5.78 0.000 .1833551 .3715588
_cons | 5.3936 .4170212 12.93 0.000 4.576253 6.210946
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]
-----------------------------+------------------------------------------------
schoolid: Unstructured |
sd(ses) | .1497065 .0726466 .0578344 .3875206
sd(_cons) | .5079367 .2035581 .2315723 1.114122
corr(ses,_cons) | -.35482 .537258 -.9179149 .6824705
-----------------------------+------------------------------------------------
sd(Residual) | 2.307591 .0214287 2.265972 2.349976
------------------------------------------------------------------------------
LR test vs. linear regression: chi2(3) = 183.56 Prob > chi2 = 0.0000
I am using Stata 12.1 with Windows 7 (64 bit).
Any help would be greatly appreciated!
Best regards,
Owen Gallupe
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/