Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: xtreg and xtivreg2


From   "Averett, Susan L" <averetts@lafayette.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: xtreg and xtivreg2
Date   Sat, 2 Apr 2011 17:24:43 -0400 (EDT)

Hi all: I am running two different models. I have a cross section of data where respondents attend different schools. I am using xtreg to do school fixed effects models.  My school variable is psuid. I have multiple observations per school.

My code is:

xtset  psuid

xtreg unsafesex $rhsage parenting mom_teenmom $rhs pc43_badsex if female==1, fe cluster(psuid)  

This works fine. I also have a potentially endogenous variable so I am running: 
xtivreg2 unsafesex $rhsage parenting mom_teenmom $rhs (pc43_badsex=talkparents kidtrouble) if female==1, fe cluster(psuid)  first

Both of these run but the second one gives me a message:
Warning - singleton groups detected.  1 observation(s) not used.

whereas the xtreg model does not give me this message and does not drop an observation. Furthermore, in my psuid variable which is the schools, there are no schools with only one student. 

I am at a loss to explain what could be going on.
Thanks,


Susan Averett
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index