Statalist


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

Re: st: RE: e(sample) not working after XTIVREG2


From   "Austin Nichols" <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: e(sample) not working after XTIVREG2
Date   Fri, 7 Nov 2008 08:06:53 -0500

Mark--
I think the singletons should be marked as `touse'=0 as this kind of
thing is just too odd:

webuse grunfeld, clear
keep if t==1 | company==1
xtreg mvalue invest, fe
reg mvalue invest if company==1

where the only thing the extra 9 singleton obs are used for is the
calculation of the "constant"
...but others may disagree.

I suppose the resolution of this question is related to whether you
believe the individual-specific means are estimated consistently (see
also -fese- on SSC) but it seems to me that since -xtivreg2- does not
even report a constant, you can take the stand that singletons are not
in the estimation sample.

It certainly seems odd to me to report a coef identified by 20 obs on
one company and a "constant" (mean FE) identified by 29 obs, and to
have the same df for tests on each, but I suppose there can be
situations where that is the behavior you want.

On Fri, Nov 7, 2008 at 7:27 AM, Schaffer, Mark E <M.E.Schaffer@hw.ac.uk> wrote:
> Erasmo,
>
>> -----Original Message-----
>> From: owner-statalist@hsphsun2.harvard.edu
>> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of
>> Erasmo Giambona
>> Sent: 07 November 2008 11:23
>> To: statalist
>> Subject: st: e(sample) not working after XTIVREG2
>>
>> Dear Prof. Schaffer and Statalisters,
>>
>> For some reasons, e(sample) does not seem to work after XTIVREG2. In
>> particular, if I run XTIVREG2 some observations are not used because
>> they are singleton (likely due to the fact that some of my RHS
>> variables are lagged 1 period relative to the dependent variable).
>> However, If I try to calculate summary statistics with the e(sample)
>> option (i.e., sum ...... if e(sample)), the singleton observations are
>> now used again. I contacted STATA Support about it. They cannot
>> explain why this happens and suggests that I contact you.
>
> This is a good question.  -xtivreg2- works this way mostly because
> that's how Stata's official FE estimators work.  If you use official
> -xtivreg- or -xtreg,fe- and you have singleton groups, they aren't
> explicitly dropped from the sample and e(sample) will include them.
>
> Probably -xtivreg2- should either (a) drop the singletons from the
> estimation sample, or (b) add an option that allows you to recover the
> singletons.  But I am not sure what is best; (a) is a significant
> variation from official Stata and should not be adopted lightly.
>
> If anyone on the list has views on this, I'd be interest to hear them!
>
> --Mark
*
*   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   |   What's new   |   Site index