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: Error Message in Dickey-Fuller Unit Root


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: Error Message in Dickey-Fuller Unit Root
Date   Wed, 18 Jan 2012 08:47:30 -0600

On Tue, Jan 17, 2012 at 2:28 PM, David B <[email protected]> wrote:
> Hi,
>
> I'm wondering if anyone might be able to shed light on an error
> message I receive when trying to implement the augmented Dickey-Fuller
> unit root test (in Stata 11/SE). I have a panel dataset comprising
> school districts in the United States between 1987 and 2009 and I
> chose the Dickey-Fuller test because it does not require balanced
> data. When I run the following command,
>
> xtunitroot fisher depvar, dfuller lags(3) demean
>
> I receive a string of error messages indicating that the test cannot
> be computed for certain panels.

Error messages like this?


. webuse grunfeld,clear

. set seed 32345

. replace inve = . if runiform() < .2
(35 real changes made, 35 to missing)

. xtunitroot fisher invest, dfuller lags(3)  demean
could not compute test for panel 5
could not compute test for panel 8
<snip output>

> Am I getting the message because these
> panels have missing data?

Yes

> I still have not been able to run the syntax
> to completion, but would the resulting syntax be trustworthy anyway,
> given that the Dickey-Fuller test statistic is derived by averaging
> those for the panels?

Yes, for those panels that make up the actual test.

 Finally, is there anything I can do to prevent
> or minimize the error (other than multiple imputation, which would be
> problematic here; some school districts are missing data because they
> didn't exist as such in certain years).

1.  Use fewer lags.

2.  Combine the test statistics from different lag lengths:

webuse grunfeld,clear
set seed 32345
replace inve = . if runiform() < .2

/*use  Ben Jann's -center- to remove cross sectional averages */
/*demean using entire data set */
bys time: center invest

xtunitroot fisher c_invest , dfuller lags(3)
local ng = r(df_P)
local p_stat = r(P)

xtunitroot fisher c_invest if com == 5 | com ==8, dfuller lag(1)

disp "Inverse chi-squared(`=`ng' +r(df_P)') `=`p_stat' + r(P)' ,
p-value = " chiprob(`ng' +r(df_P), `p_stat' + r(P))


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