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: three-level xtreg


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: three-level xtreg
Date   Wed, 29 Jun 2011 12:10:21 -0400

A random effect model would be estimable with

xtmixed incorr spanish otherl bmi dep bmi_p50 bmi_p80 popbmi || aid: || scid:

For a fixed effects model, you need to decide which level you will be
having your fixed effects at, as it does not make sense to have more
than one level. If you have them at personal level, then the school
effects are not identified (think about the dummy variable
interpretation: the school dummy is the sum of the student dummies).

On Wed, Jun 29, 2011 at 12:05 PM, Lisa Marie Yarnell
<[email protected]> wrote:
> Hello Statalisters.  My question is on three-level xtreg models.
>
> I have seen 2-level xtreg models (e.g., time points nested within persons):
> xtreg incorr spanish otherl bmi dep bmi_p50 bmi_p80 popbmi, i(aid) fe
>
> I want to nest time points within persons within schools.  I got an error message when I tried:
> . xtreg incorr spanish otherl bmi dep bmi_p50 bmi_p80 popbmi, i(aid scid) fe
> i():  too many variables specified
>
> What is the code for this?
>
> Thanks for your help,
> Lisa
> *
> *   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/
>



-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.

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


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