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]

st: RE: Re: xttest2


From   Nicolas Francois <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: xttest2
Date   Wed, 3 Apr 2013 11:05:51 +0200

Tyvm for your answer!

My dependend variable is the only one with missing observations. My
explanatory variables are present for all of the individuals for both my
time periods. Do I get the error because 
I only have 2 time periods?

-----Oorspronkelijk bericht-----
Van: [email protected]
[mailto:[email protected]] Namens Christopher Baum
Verzonden: dinsdag 2 april 2013 15:29
Aan: [email protected]
Onderwerp: st: Re: xttest2

<>
Nicolas wrote

> I want to be able to test for heteroscedasticity (preferably 
> Breusch-Pagan) after running an instrumented regression on an unbalanced
panel.
> 
> When I use xttest2 after ivreg2 I get the following error:
> 
> ***********
> Error: too few common observations across panel.
> no observations
> r(2000);
> ***********
> 
> Does anyone now how I can get around this error? Or maybe a command 
> that does work.

-xttest2-  requires that SOME observations are present in all panels, as it
is computing the correlations across panels of the residual vectors. So

webuse grunfeld
ivreg2 invest (mvalue = kstock time)
xttest2

however if you create imbalance in the panels, so that there are no years in
common across all firms, 

drop if year<1945 & company==1
drop if year >1944 & company==2
ivreg2 invest (mvalue = kstock time)
xttest2

the Breusch-Pagan test cannot be performed, as casewise deletion in the
matrix of residuals leaves no usable observations, as the error message
says. You can get around the error by restricting your analysis to those
periods when all panels are observed; -xttest2- will then work fine.

Kit
author -xttest2- (SSC)


Kit Baum   |   Boston College Economics & DIW Berlin   |
http://ideas.repec.org/e/pba1.html
                             An Introduction to Stata Programming  |
http://www.stata-press.com/books/isp.html
  An Introduction to Modern Econometrics Using Stata  |
http://www.stata-press.com/books/imeus.html
 
http://www.crup.com.cn/Item/111779.aspx     


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index