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: xtreg and xtivreg2
From
Nick Sanders <[email protected]>
To
"[email protected]" <[email protected]>
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" <[email protected]> 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/