Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Deleteing cases without warning in -hetgrot-


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: Deleteing cases without warning in -hetgrot-
Date   Mon, 08 Mar 2004 08:50:17 -0500

At 01:31 PM 3/8/2004 +0000, Clive Nicholas wrote:
Unfortunately, there's a problem. After calling -hetgrot [panelvar]- (which
runs the test), the ado-file deletes one or two observations from each
panel in the dataset. As you can imagine, this is quite disconcerting, and
it means that I have to -exit, clear- each time.

I'm sure there's something in the code that causes this (and perhaps
correctly, because of the degrees of freedom consumed in calculating the
statistic). Can anybody see any way around this?
This part of the code would seem to be the obvious candidate:

drop if e(sample)==0
If this is the culprit and you don't want the cases dropped, either (a) rewrite the code using if statements to always select those cases in e(sample), or (b) just reopen your data set at the end.

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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