[R] CADFtest difference between max.lag.y with criterion and without criterion
José Dias Curto
d|@@@curto @end|ng |rom |@cte-|u|@pt
Thu Mar 14 13:51:37 CET 2024
Dear Professor Bernhard,
Sorry for take your time, but I found something strange that I am not able to explain/understand.
Suppose that I compute the ADF test by using the criterion="BIC" to select the lags:
summary(CADFtest(y, max.lag.y = 20, type = "drift", criterion="BIC"))
Suppose that 2 lags are selected.
Next, if I set the lags to 2: summary(CADFtest(y, max.lag.y = 2, type = "drift"))
the ADF test result is different... You can confirm down, please. I think the reason is the number of included observations after adjustments... 8533 in the first case and 8551 in the second case.
What am I doing wrong?
Thank you very much for your help.
Best regards,
Jos� Dias Curto
> summary(CADFtest(y, max.lag.y = 20, type = "drift", criterion="BIC"))
Augmented DF test
ADF test
t-test statistic: 0.1070651
p-value: 0.9663296
Max lag of the diff. dependent variable: 2.0000000
Call:
dynlm(formula = formula(model), start = obs.1, end = obs.T)
Residuals:
Min 1Q Median 3Q Max
-116.646 -3.719 0.163 4.444 110.891
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.758e-01 2.649e-01 1.041 0.297853
L(y, 1) 2.256e-05 2.107e-04 0.107 0.966330
L(d(y), 1) -5.086e-02 1.085e-02 -4.689 2.78e-06 ***
L(d(y), 2) -4.030e-02 1.086e-02 -3.710 0.000209 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 12.73 on 8529 degrees of freedom
Multiple R-squared: 0.003998, Adjusted R-squared: 0.003648
F-statistic: 17.12 on 2 and 8529 DF, p-value: 3.809e-08
> summary(CADFtest(y, max.lag.y = 2, type = "drift"))
Augmented DF test
ADF test
t-test statistic: 0.111863
p-value: 0.966685
Max lag of the diff. dependent variable: 2.000000
Call:
dynlm(formula = formula(model), start = obs.1, end = obs.T)
Residuals:
Min 1Q Median 3Q Max
-116.647 -3.706 0.155 4.438 110.890
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.2743714 0.2638699 1.040 0.298463
L(y, 1) 0.0000235 0.0002101 0.112 0.966685
L(d(y), 1) -0.0508659 0.0108353 -4.694 2.71e-06 ***
L(d(y), 2) -0.0403022 0.0108507 -3.714 0.000205 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 12.72 on 8547 degrees of freedom
Multiple R-squared: 0.003999, Adjusted R-squared: 0.003649
F-statistic: 17.16 on 2 and 8547 DF, p-value: 3.662e-08
[[alternative HTML version deleted]]
More information about the R-help
mailing list