Bookmark and Share

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]

Re: st: RE: Obtaining level 2 coefficients in multilevel models


From   Owen Gallupe <[email protected]>
To   [email protected]
Subject   Re: st: RE: Obtaining level 2 coefficients in multilevel models
Date   Fri, 2 Aug 2013 11:47:35 -0400

Thank you for the input, Eilya and Lucas/Sam. Very helpful and appreciated!

Owen

On Thu, Aug 1, 2013 at 11:39 AM, Lucas <[email protected]> wrote:
> Hi Owen and Eilya,
>
> Eilya's answer is not my understanding.  Yes, it is an identification
> problem if you simply take the mean SES of the students in the school
> and use that as a covariate.  But, there are other ways to measure
> school SES specifically (e.g., per pupil expenditure, size of
> endowment) and context features in general.  Manski argued, rightly,
> against simply taking some mathematical function of individual-level
> variables as measures of macro-level factors, echoing Hauser's (1969)
> classic paper, Context and Consex.
>
> With respect to your stata question, stata staff have indicated that
> your stata question is likely to be addressed with more examples in
> the next iteration of the manuals.  The answer, as I understand it, is
> that you need to interact put school SES (measured appropriately) in
> the level-1 equation and put SES in the level-2 "equation".  So, the
> code would be:
>
> xtmixed collopp grades sports ses schoolses || schoolid: ses, cov(unstructured)
>
> While we are on the subject of difficulties with multilevel modeling,
> you might find interesting a recently published paper titled "An
> Inconvenient Dataset" which indicates (against some who have argued
> otherwise) that you need either censuses within each context or
> probability samples within each context (and you need a probability
> sample of contexts or a census of them, too), or results will be
> biased in an unknown direction.
>
> HTH
> Sam
>
> On Thu, Aug 1, 2013 at 12:26 AM, Eilya Torshizian
> <[email protected]> wrote:
>> Hi Owen,
>>
>> The problem you mentioned is an identification problem (mentioned by Manski 1993, The reflection problem). You can address this issue by serving a Heckit model (or maybe a Truncated one) as follows.
>>
>> Y = x'b + e
>> D = 1(z'G + q > 0)
>>
>> Consequently, you should consider writing the code for Two Stage Least Squares (TSLS).
>>
>> Eilya.
>>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On Behalf Of Owen Gallupe
>> Sent: Thursday, 1 August 2013 6:55 p.m.
>> To: [email protected]
>> Subject: st: Obtaining level 2 coefficients in multilevel models
>>
>> 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/
>>
>> *
>> *   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/
>
> *
> *   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/

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index