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]

Re: st: xtreg and xtivreg2


From   Nick Sanders <sandersn@stanford.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: xtreg and xtivreg2
Date   Sat, 2 Apr 2011 14:31:00 -0700

Have you checked to see if your instrument has a singleton observation?

Sent from my iPhone - please excuse typos and/or brevity.

On Apr 2, 2011, at 2:24 PM, "Averett, Susan L" <averetts@lafayette.edu> wrote:

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

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