Statalist


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

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


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: e(sample) not working after XTIVREG2
Date   Fri, 7 Nov 2008 07:55:10 -0500

Erasmo Giambona <[email protected]> :
Do you want something like this?

webuse grunfeld, clear
drop if time>1 & company==10
xtivreg2 mvalue invest, fe
g s=e(sample)
egen c=count(s), by(company)
g ok=s*(c>1)
tab company ok

Note that -xtivreg2- is on SSC, and e(sample) works as expected when
using the -fd- option.

On Fri, Nov 7, 2008 at 6:22 AM, Erasmo Giambona <[email protected]> wrote:
> 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.
>
> I would appreciate if you or any Statalisters could suggest how I
> could fix this problem.
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index