Bookmark and Share

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: FE vs RE and Hausman


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: FE vs RE and Hausman
Date   Sat, 5 Mar 2011 10:04:23 +0000

I don't follow Jeff's last statement. If two panels have different
numbers of 1s in y then
the sum of y will differ, and so will dy, but don't both qualify as constant y?

Perhaps Jeff means the mean of y, not its sum.

The main point is clearly that it is important to check, and there are
are several ways to do it. Here are a few more.

bysort id (y) : assert y[1] == y[_N]

will be denied if there is within-panel variation, although this
approach needs modification if
y is ever missing. Use != for the converse check.

-egen- also has an -sd()- function.

See also

FAQ     . . . . . .  Listing observations in a group that differ on a variable
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
        11/01   How do I list observations in a group that differ
                on a variable?
                http://www.stata.com/support/faqs/data/diff.html

On Sat, Mar 5, 2011 at 2:16 AM, Wooldridge, Jeffrey <[email protected]> wrote:
> Random effects will work provided there is some cross section variation
> but FE will not. Is it possible that every unit in your sample has
> either all ones in every time period or all zeros in every time period?
>
> Try this:
>
> egen sumy = sum(y), by(id)
> tab sumy
>
> If you have a balanced panel, does sumy take on only two values?
>
> More generally, define
>
> dy = y - sumy
> tab dy
>
> If this is always zero, then y does not vary by id.
>
Dmitriy Krichevskiy
>
> Well, the Random Effect parts seems to work fine. Hence, I am really
> perplexed here.
>
> On 3/4/11, Brendan Halpin <[email protected]> wrote:
>> On Fri, Mar 04 2011, Dmitriy Krichevskiy wrote:
>>
>>> Unfortunately my attempts have failed as I get  'outcome
>>> does not vary in any group' error anytime I try to run Fixed effect.
>>
>> Is it possible that the outcome variable doesn't vary within ID?
>>
>> Either because that is what the data says, or because you have somehow
>> mis-specified the ID variable in such a way that it is broken down by
>> outcome?

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index