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

Re: st: between estimator heteroscedasticity and omitted variables


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: between estimator heteroscedasticity and omitted variables
Date   Mon, 26 Jul 2004 13:25:18 -0400 (EDT)

Andrea Molinari wrote:

> I am estimating a panel model, and need to test for heteroscedasticity
> and correct for it.

Stata has a FAQ on that at
http://www.stata.com/support/faqs/stat/panel.html

> Both pooled OLS and between effects are fine, but I could not figure out
> how to test and how to then control for heteroscedasticity on a between
> model.  I tried to replicate the between by estimating an OLS over the
> means, but the output is not exactly the same and I'm not sure what
> could be wrong...

What exactly did you do with the means? How many observations were left?
If you just created the means in each panel and ran OLS with the original
data still in memory, then you would have more than one observation per
panel, so you should have something like

bysort panel : gen byte touse = (_n==1)
reg ... if touse

to restrict your number of obserations to the number of panels.

Alternatively (and to my view, more reliably), you can transform your data
to the between regression through

xtdata ... , be

to produce the data set suitable for the between estimation, and then

regress ... , nocons

to get your results. Then the regular -hettest- would give you
a LM-type heteroskedasticity test. Stata Corp. warns however that -xtdata-
should only be used for specification search, and the results are only
appropriate with their -xtreg- command.

> On a similar note, I'd also need to run an omitted variables test, but
> ovtest is only running after the regress (or anova) command, and could
> not find an omitted variables test for panel models.

What -ovtest- does is it tests for nonlinearity. It does not test for the
omitted variables in the sense econometricians talk about... but it's too
late to rename it into something more appropriate :). You can only figure
out if a variable was incorrectly omitted from your regression by adding
it to the model and seeing what happens.

 ---                                    Stas Kolenikov
 --       Ph.D. student in Statistics at UNC-Chapel Hill
 - http://www.komkon.org/~tacik/  -- [email protected]

* This e-mail and all attachments to it are not intended to provide any
* reasonable point of view and was transmitted to you in error. It
* should be immediately deleted by all recipients unless they really
* enjoy communicating with the author :). Other restrictions apply.

*
*   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