PP test for Unit root
Posted: Thu Aug 25, 2011 4:28 am
I try to estimate unit roots using the Philips Perron(PP) test. So I calculate the value f_0 (HAC corrected variance) for it, using EViews 7 User Guide formulas. Here is the example:
y = c(5, 6, 7, 1, 2, 3, 5, 8, 2, 9, 6, 3, 4, 1, 7, 8, 7, 3, 3, 2)
Adj. t-Stat Prob.*
Phillips-Perron test statistic -3.965202 0.0076
Test critical values: 1% level -3.831511
5% level -3.029970
10% level -2.655194
*MacKinnon (1996) one-sided p-values.
Warning: Probabilities and critical values calculated for 20 observations
and may not be accurate for a sample size of 19
Residual variance (no correction) 45.73460
HAC corrected variance (Bartlett kernel) 45.78905
Phillips-Perron Test Equation
Dependent Variable: D(Y)
Method: Least Squares
Date: 08/25/11 Time: 17:24
Sample (adjusted): 2 20
Included observations: 19 after adjustments
Variable Coefficient Std. Error t-Statistic Prob.
Y(-1) -0.970802 0.244847 -3.964942 0.0010
C 6.075679 2.272003 2.674151 0.0160
R-squared 0.480452 Mean dependent var -0.157895
Adjusted R-squared 0.449891 S.D. dependent var 9.639405
S.E. of regression 7.149485 Akaike info criterion 6.871258
Sum squared resid 868.9573 Schwarz criterion 6.970673
Log likelihood -63.27696 Hannan-Quinn criter. 6.888083
F-statistic 15.72076 Durbin-Watson stat 1.977052
Prob(F-statistic) 0.001000
For the example I choose lag 1 and get the following values (calculated manually):
Residual variance (no correction) 45.73460
HAC corrected variance (Bartlett kernel) 45.73460
But EViews show me a bit different results:
Residual variance (no correction) 45.73460
HAC corrected variance (Bartlett kernel) 45.78905
Perhaps, I was mistaken in calculation of gamma(j). For lag 1 gamma(j)= 868,9573/19=45,73459474, and K=1 only in case 0, and K=0 in other cases.
why?
y = c(5, 6, 7, 1, 2, 3, 5, 8, 2, 9, 6, 3, 4, 1, 7, 8, 7, 3, 3, 2)
Adj. t-Stat Prob.*
Phillips-Perron test statistic -3.965202 0.0076
Test critical values: 1% level -3.831511
5% level -3.029970
10% level -2.655194
*MacKinnon (1996) one-sided p-values.
Warning: Probabilities and critical values calculated for 20 observations
and may not be accurate for a sample size of 19
Residual variance (no correction) 45.73460
HAC corrected variance (Bartlett kernel) 45.78905
Phillips-Perron Test Equation
Dependent Variable: D(Y)
Method: Least Squares
Date: 08/25/11 Time: 17:24
Sample (adjusted): 2 20
Included observations: 19 after adjustments
Variable Coefficient Std. Error t-Statistic Prob.
Y(-1) -0.970802 0.244847 -3.964942 0.0010
C 6.075679 2.272003 2.674151 0.0160
R-squared 0.480452 Mean dependent var -0.157895
Adjusted R-squared 0.449891 S.D. dependent var 9.639405
S.E. of regression 7.149485 Akaike info criterion 6.871258
Sum squared resid 868.9573 Schwarz criterion 6.970673
Log likelihood -63.27696 Hannan-Quinn criter. 6.888083
F-statistic 15.72076 Durbin-Watson stat 1.977052
Prob(F-statistic) 0.001000
For the example I choose lag 1 and get the following values (calculated manually):
Residual variance (no correction) 45.73460
HAC corrected variance (Bartlett kernel) 45.73460
But EViews show me a bit different results:
Residual variance (no correction) 45.73460
HAC corrected variance (Bartlett kernel) 45.78905
Perhaps, I was mistaken in calculation of gamma(j). For lag 1 gamma(j)= 868,9573/19=45,73459474, and K=1 only in case 0, and K=0 in other cases.
why?