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]

st: xtreg and xtivreg2


From   "Averett, Susan L" <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index