[R-SIG-Finance] Differencing / Detrending in "vars"-Package

Gero Schwenk gero.schwenk at web.de
Tue Nov 9 14:47:04 CET 2010


Hello together!
I've got a question regarding the use of the "vars"-package. As far as I 
know, VAR-models require stationary time series as input, which can 
generally be reached by repeatedly differencing the series and tested 
using unit-root tests.

Now the VAR-function in the "vars"-package allows to include a trend 
coefficient to the model, as seen in the example taken from Cowpertwait, 
Metcalfe, "Introductory Time Series with R", Springer:

library(vars)
US.var <- VAR(cbind(GNP, M1), p = 3, type = "trend")
summary(US.var)

The output, which is shown below, reports all roots of the 
characteristic polynomial being smaller than one, indicating an 
integrative, nonstationary process. Now the question: Does inclusion of 
the trend coefficient free me from worrying about nonstationarity? 
(Obviously, a stationary series should contain no deterministic trend.)
I Would be very happy for hints...
Cheers and thanks,
Gero

####

 > summary(US.var)

VAR Estimation Results:
=========================
Endogenous variables: GNP, M1
Deterministic variables: trend
Sample size: 133
Log Likelihood: -1003.311
Roots of the characteristic polynomial:
0.999 0.9109 0.6363 0.5036 0.3491 0.03296
Call:
VAR(y = cbind(GNP, M1), p = 3, type = "trend")


Estimation results for equation GNP:
====================================
GNP = GNP.l1 + M1.l1 + GNP.l2 + M1.l2 + GNP.l3 + M1.l3 + trend

Estimate Std. Error t value Pr(>|t|)
GNP.l1 1.075374 0.088430 12.161 <2e-16 ***
M1.l1 1.036148 0.410287 2.525 0.0128 *
GNP.l2 -0.006781 0.132817 -0.051 0.9594
M1.l2 -0.300379 0.754331 -0.398 0.6912
GNP.l3 -0.127237 0.085086 -1.495 0.1373
M1.l3 -0.563697 0.445689 -1.265 0.2083
trend 1.035030 0.435195 2.378 0.0189 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Residual standard error: 23.31 on 126 degrees of freedom
Multiple R-Squared: 0.9999, Adjusted R-squared: 0.9999
F-statistic: 2.398e+05 on 7 and 126 DF, p-value: < 2.2e-16


Estimation results for equation M1:
===================================
M1 = GNP.l1 + M1.l1 + GNP.l2 + M1.l2 + GNP.l3 + M1.l3 + trend

Estimate Std. Error t value Pr(>|t|)
GNP.l1 -0.04391 0.01911 -2.298 0.02319 *
M1.l1 1.59231 0.08865 17.961 < 2e-16 ***
GNP.l2 0.06165 0.02870 2.148 0.03362 *
M1.l2 -0.48914 0.16299 -3.001 0.00325 **
GNP.l3 -0.01755 0.01839 -0.954 0.34170
M1.l3 -0.10411 0.09630 -1.081 0.28174
trend 0.01160 0.09404 0.123 0.90204
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Residual standard error: 5.036 on 126 degrees of freedom
Multiple R-Squared: 0.9999, Adjusted R-squared: 0.9999
F-statistic: 1.899e+05 on 7 and 126 DF, p-value: < 2.2e-16



Covariance matrix of residuals:
GNP M1
GNP 543.11 12.21
M1 12.21 25.36

Correlation matrix of residuals:
GNP M1
GNP 1.0000 0.1041
M1 0.1041 1.0000



More information about the R-SIG-Finance mailing list