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

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

From   "Schaffer, Mark E" <>
To   <>
Subject   st: RE: e(sample) not working after XTIVREG2
Date   Fri, 7 Nov 2008 12:27:57 -0000


> -----Original Message-----
> From: 
> [] 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!


> I would appreciate if you or any Statalisters could suggest how I
> could fix this problem.
> Best regards,
> Erasmo
> *
> *   For searches and help try:
> *
> *
> *

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

*   For searches and help try:

© Copyright 1996–2021 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index