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: RE: RE: Number of observations: xtreg and xtivreg2


From   "Abou Nabout, Nadia" <abounabout@wiwi.uni-frankfurt.de>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: Number of observations: xtreg and xtivreg2
Date   Wed, 29 Sep 2010 09:24:07 +0000

Thanks a lot!!! Sure, this must be the reason!

Nadia

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Schaffer, Mark E
Sent: Wednesday, September 29, 2010 11:22 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: RE: Number of observations: xtreg and xtivreg2

Nadia,

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of 
> Abou Nabout, Nadia
> Sent: 29 September 2010 10:05
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Number of observations: xtreg and xtivreg2
> 
> Dear Statalist readers,
> 
> I am running a fixed effects model on a dataset with about 
> 97,000 observations.
> 
> While xtreg seems to use all these observations (xtreg ln_cpc 
> position t qs qs_sq, i(keyword_id) fe), xtivreg2 (2SLS model 
> with fixed effects: xtivreg2 ln_cpc t qs qs_sq 
> (position=aktgebot), fe) only uses about 96,000 of these 
> observations. I checked all the variables and instruments for 
> missing values but there are none. I also do not have any 
> lagged dependent variables in there, so I am wondering why 
> the number of observations is lower for xtivreg2 compared to xtreg.

Are any of these observations singletons?  These are panel units with
only one observation.  The FE within transformation wipes them out and
they are not used in the estimation.  xtivreg2 notes this and adjusts
the number of obs accordingly.  If xtivreg2,fe and xtreg,fe give you
otherwise identical results, this is probably the explanation.

--Mark

> Any help would be highly appreciated!
> 
> Best,
> Nadia
> 
> 
> 
> *
> *   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/
> 


-- 
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


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