p99323005 at ntu.edu.tw
2011-Nov-14 03:34 UTC
[R] What is the CADF test criterion="BIC" report?
Hello: I am a rookie in using R. When I used the unit root test in "CADFtest", I got the different t-test statistics between using criterion="BIC" and no using criterion. But when I checked the result with eviews, I find out that no using criterion is correct. Why after using criterion="BIC", I got the different result? Paul> data(Canada)> ADFt <- CADFtest(Canada[,1], max.lag.y = 14, criterion="BIC")> summary(ADFt)Augmented DF test ADF test t-test statistic: -1.389086 p-value: 0.855681 Max lag of the diff. dependent variable: 1.000000 Call: dynlm(formula = formula(model), start = obs.1, end = obs.T) Residuals: Min 1Q Median 3Q Max -0.79726 -0.20587 -0.03332 0.23840 0.70460 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 24.342321 17.435476 1.396 0.167 trnd 0.009959 0.006941 1.435 0.156 L(y, 1) -0.026068 0.018767 -1.389 0.856 L(d(y), 1) 0.615983 0.092632 6.650 7.18e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3533 on 65 degrees of freedom Multiple R-squared: 0.413, Adjusted R-squared: 0.3859 F-statistic: NA on NA and NA DF, p-value: NA> ADFt1 <- CADFtest(Canada[,1], max.lag.y =1)> summary(ADFt1)Augmented DF test ADF test t-test statistic: -2.7285715 p-value: 0.2282588 Max lag of the diff. dependent variable: 1.0000000 Call: dynlm(formula = formula(model), start = obs.1, end = obs.T) Residuals: Min 1Q Median 3Q Max -0.84769 -0.24745 -0.02081 0.24187 0.82344 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 47.661910 17.439021 2.733 0.00776 ** trnd 0.019217 0.007005 2.743 0.00754 ** L(y, 1) -0.051256 0.018785 -2.729 0.22826 L(d(y), 1) 0.753011 0.075724 9.944 1.61e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3937 on 78 degrees of freedom Multiple R-squared: 0.5674, Adjusted R-squared: 0.5508 F-statistic: NA on NA and NA DF, p-value: NA
Pfaff, Bernhard Dr.
2011-Nov-14 10:12 UTC
[R] What is the CADF test criterion="BIC" report?
Hello Paul, just a guess: different sample sizes! In your first call, the sample is shorter than in your second. Hence, you can test this, if you curtail your data set in your second call and then you should obtain the same result, i.e.:> library(vars) > data(Canada) > test <- summary(CADFtest(Canada[-c(1:13), 1], max.lag.y = 1)) > testAugmented DF test ADF test t-test statistic: -1.389086 p-value: 0.855681 Max lag of the diff. dependent variable: 1.000000 Call: dynlm(formula = formula(model), start = obs.1, end = obs.T) Residuals: Min 1Q Median 3Q Max -0.79726 -0.20587 -0.03332 0.23840 0.70460 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 24.471789 17.521147 1.397 0.167 trnd 0.009959 0.006941 1.435 0.156 L(y, 1) -0.026068 0.018767 -1.389 0.856 L(d(y), 1) 0.615983 0.092632 6.650 7.18e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3533 on 65 degrees of freedom Multiple R-squared: 0.413, Adjusted R-squared: 0.3859 F-statistic: NA on NA and NA DF, p-value: NA Though, I am not the package maintainer who could provide you with more insights, but the source code itself. Best, Bernhard -----Urspr?ngliche Nachricht----- Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im Auftrag von p99323005 at ntu.edu.tw Gesendet: Montag, 14. November 2011 04:35 An: r-help at r-project.org Betreff: [R] What is the CADF test criterion="BIC" report? Hello: I am a rookie in using R. When I used the unit root test in "CADFtest", I got the different t-test statistics between using criterion="BIC" and no using criterion. But when I checked the result with eviews, I find out that no using criterion is correct. Why after using criterion="BIC", I got the different result? Paul> data(Canada)> ADFt <- CADFtest(Canada[,1], max.lag.y = 14, criterion="BIC")> summary(ADFt)Augmented DF test ADF test t-test statistic: -1.389086 p-value: 0.855681 Max lag of the diff. dependent variable: 1.000000 Call: dynlm(formula = formula(model), start = obs.1, end = obs.T) Residuals: Min 1Q Median 3Q Max -0.79726 -0.20587 -0.03332 0.23840 0.70460 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 24.342321 17.435476 1.396 0.167 trnd 0.009959 0.006941 1.435 0.156 L(y, 1) -0.026068 0.018767 -1.389 0.856 L(d(y), 1) 0.615983 0.092632 6.650 7.18e-09 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3533 on 65 degrees of freedom Multiple R-squared: 0.413, Adjusted R-squared: 0.3859 F-statistic: NA on NA and NA DF, p-value: NA> ADFt1 <- CADFtest(Canada[,1], max.lag.y =1)> summary(ADFt1)Augmented DF test ADF test t-test statistic: -2.7285715 p-value: 0.2282588 Max lag of the diff. dependent variable: 1.0000000 Call: dynlm(formula = formula(model), start = obs.1, end = obs.T) Residuals: Min 1Q Median 3Q Max -0.84769 -0.24745 -0.02081 0.24187 0.82344 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 47.661910 17.439021 2.733 0.00776 ** trnd 0.019217 0.007005 2.743 0.00754 ** L(y, 1) -0.051256 0.018785 -2.729 0.22826 L(d(y), 1) 0.753011 0.075724 9.944 1.61e-15 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3937 on 78 degrees of freedom Multiple R-squared: 0.5674, Adjusted R-squared: 0.5508 F-statistic: NA on NA and NA DF, p-value: NA ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ***************************************************************** Confidentiality Note: The information contained in this ...{{dropped:10}}
In order for the information criteria to be able to select the model, all the models have to be estimated on the same sample. Therefore, all the models are estimated and compared using the same sample used for the model containing the largest number of lags. You can find this and other details in Lupi, C. (2009). "Unit Root CADF Testing with R", Journal of Statistical Software, 2009, 32(2), 1-19 -- View this message in context: http://r.789695.n4.nabble.com/What-is-the-CADF-test-criterion-BIC-report-tp4038700p4039259.html Sent from the R help mailing list archive at Nabble.com.
Hi Paul, You are right. Model selection takes places using the common data sample across ALL checked models (otherwise you would end up comparing models estimated on different data!). What the procedure returns are the results based on the common sample. If you want to have the full-sample results, you should re-run the model using the selected lags (fixed). Best, Claudio -- View this message in context: http://r.789695.n4.nabble.com/What-is-the-CADF-test-criterion-BIC-report-tp4038700p4042207.html Sent from the R help mailing list archive at Nabble.com.