0
$\begingroup$

I need to fit my VAR model, so I am trying to induce stationarity in all my variables. One in particular, Industrial Production for the euro area, is creating me some issues. Below you see why. There is a clear break which divides two trending series. enter image description here

What I do then, well I first log the variable and then difference it. This is the result:

enter image description here

Before showing you the outcomes of the tests I performed, I want to say that I also subsetted the series around the break but the same problem persists. Coming to the analysis, If I read the outcomes of the tests correctly, this series doesn't have a unit root but it has a trend - it's trend stationary. Hence, despite not having unit root, I can't conclude it's covariance stationary.

This is the outcome of ADF test that shows no unit root:

############################################### 
# Augmented Dickey-Fuller Test Unit Root Test # 
############################################### 

Test regression none 


Call:
lm(formula = z.diff ~ z.lag.1 - 1 + z.diff.lag)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.044247 -0.005311  0.000850  0.007861  0.029896 

Coefficients:
           Estimate Std. Error t value Pr(>|t|)    
z.lag.1    -0.79718    0.09875  -8.072 6.83e-14 ***
z.diff.lag -0.20497    0.06994  -2.931  0.00379 ** 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.01177 on 196 degrees of freedom
Multiple R-squared:  0.522, Adjusted R-squared:  0.5171 
F-statistic:   107 on 2 and 196 DF,  p-value: < 2.2e-16


Value of test-statistic is: -8.0723 

Critical values for test statistics: 
      1pct  5pct 10pct
tau1 -2.58 -1.95 -1.62

Here the same test testing for drif and showing that there is indeed a drift:

############################################### 
# Augmented Dickey-Fuller Test Unit Root Test # 
############################################### 

Test regression drift 


Call:
lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.044961 -0.005811  0.000351  0.007332  0.029402 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  0.0005167  0.0008411   0.614  0.53971    
z.lag.1     -0.8023323  0.0992668  -8.083 6.54e-14 ***
z.diff.lag  -0.2024179  0.0701780  -2.884  0.00436 ** 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.01179 on 195 degrees of freedom
Multiple R-squared:  0.5229,    Adjusted R-squared:  0.518 
F-statistic: 106.9 on 2 and 195 DF,  p-value: < 2.2e-16


Value of test-statistic is: -8.0826 32.6664 

Critical values for test statistics: 
      1pct  5pct 10pct
tau2 -3.46 -2.88 -2.57
phi1  6.52  4.63  3.81

Same result applies when testing for a trend:

############################################### 
# Augmented Dickey-Fuller Test Unit Root Test # 
############################################### 

Test regression trend 


Call:
lm(formula = z.diff ~ z.lag.1 + 1 + tt + z.diff.lag)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.044911 -0.006058  0.000356  0.007282  0.029086 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)  3.380e-05  1.699e-03   0.020  0.98415    
z.lag.1     -8.032e-01  9.953e-02  -8.070  7.2e-14 ***
tt           4.811e-06  1.470e-05   0.327  0.74383    
z.diff.lag  -2.021e-01  7.035e-02  -2.873  0.00452 ** 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.01182 on 194 degrees of freedom
Multiple R-squared:  0.5232,    Adjusted R-squared:  0.5158 
F-statistic: 70.95 on 3 and 194 DF,  p-value: < 2.2e-16


Value of test-statistic is: -8.07 21.7136 32.568 

Critical values for test statistics: 
      1pct  5pct 10pct
tau3 -3.99 -3.43 -3.13
phi2  6.22  4.75  4.07
phi3  8.43  6.49  5.47

Yet, adf.test shows that my variable is stationary, which I therefore interpret as being trend stationary:

Augmented Dickey-Fuller Test

data:  diff(log(baseline_model$`Industrial Production`))
Dickey-Fuller = -14.054, Lag order = 0, p-value = 0.01
alternative hypothesis: stationary

This interpretation is confirmed by the KPSS test:

KPSS Test for Trend Stationarity

data:  diff(log(baseline_model$`Industrial Production`))
KPSS Trend = 0.0683, Truncation lag parameter = 4, p-value = 0.1

Then the question boils down to: how would you model this series to remove the drift/trend and induce stationary? Is it wrong if I throw it in the vAR model with a stationary trend in it?

Thanks so much for your help

I include here the data of my orginal (not transformed) variable (monthly data from 2002-01 to 2018-09). Reproducible in R.

df <- data.frame(Industrial_Production = c(92.2, 92.9, 93.6, 93.0, 93.2, 94.0, 92.9, 93.8, 93.7, 93.0, 94.3, 92.4, 93.7, 93.3, 93.4, 93.5, 92.0, 92.0, 93.7, 92.0, 92.3, 94.2, 94.5, 94.6, 94.2, 94.9, 94.6, 95.5, 95.6, 95.8, 96.8, 93.8, 95.8, 96.4, 95.0, 94.9, 96.5, 95.5, 95.6, 97.2, 95.8, 96.6, 97.3, 96.6, 97.9, 98.1, 99.5, 98.3, 98.8, 98.7, 99.4, 100.1, 102.1, 101.8, 101.6, 102.3, 102.5, 102.4, 103.1, 105.0, 104.8, 105.2, 105.6, 104.3, 106.0, 105.7, 106.2, 107.0, 106.3, 107.0, 106.1, 107.1, 108.6, 108.4, 107.5, 108.0, 105.6, 105.7, 104.4,  104.4, 103.0, 100.4, 96.7, 93.0, 88.3, 86.3, 85.5, 84.5, 86.6, 86.8, 86.9, 87.0, 89.5, 88.9, 89.4, 89.2, 90.3, 90.0, 92.2, 92.6, 94.1, 95.0, 94.3, 95.0, 95.6, 96.3, 97.1, 97.5, 97.7, 98.9, 99.0, 99.0, 99.5, 98.1, 99.0, 99.3, 98.1, 98.0, 98.2, 97.7, 96.8, 96.6, 97.7, 95.8, 97.1, 96.2, 96.8, 97.5, 95.5, 94.8, 94.0, 94.6, 94.0, 94.0, 94.6, 95.1, 95.6, 95.8, 94.9, 95.7, 95.7, 95.3, 96.7, 96.6, 96.7, 97.6, 97.1, 98.5, 97.4, 96.8, 98.0, 95.9, 97.0, 96.9, 96.7, 98.0, 97.5, 99.7, 100.6, 99.9, 100.3, 100.7, 100.7, 99.8, 100.2, 99.9, 100.1, 100.8, 103.9, 101.5, 100.4, 101.7, 100.3, 101.6, 101.3, 101.6, 101.6, 102.7, 103.3, 102.6, 102.0, 103.1, 103.3, 104.0, 104.2, 103.9, 105.6, 106.2, 106.0, 105.6, 108.6, 108.3, 107.8, 105.6, 105.8, 106.1, 107.2, 107.0, 106.1, 107.2, 106.6))

plot.ts(df)

$\endgroup$
1
$\begingroup$

Two options, both of them good:

  • Detrend the series before including it in the VAR model.
  • Add a variable representing the trend to each equation of your VAR model.

(This is similar to dealing with seasonality: you can seasonally adjust the series outside or within the model.)

$\endgroup$
8
  • 1
    $\begingroup$ If I remember correctly, the implementation of the second option is readily available in the vars package in R. The implementation of the first option is trivial (at least in theory). $\endgroup$ – Richard Hardy Feb 25 '20 at 13:12
  • $\begingroup$ Thanks Richard! In the VAR package in R there is indeed this option. Just last one confirmatory question: in both cases you suggested, it is done on my already differenced and logged variable, right? Not, on the original one (first graph). Thanks again $\endgroup$ – Rollo99 Feb 25 '20 at 13:22
  • $\begingroup$ @Rollo99, why would you difference your variable if there is no unit root? This would lead to the problem of overdifferencing. $\endgroup$ – Richard Hardy Feb 25 '20 at 13:30
  • $\begingroup$ There is no unit root AFTER differencing. AFTER differencing I still have a trend but not unit root $\endgroup$ – Rollo99 Feb 25 '20 at 13:33
  • 1
    $\begingroup$ @Rollo, OK, if you have a linear trend (for argument's sake) after differencing, that means you have a quadratic trend before differencing. If that makes sense, then go ahead with what I suggested applying it to your differenced variable. (Though visually I do not see the trend in the lower graph.) Also, it might be easier to follow your question if you posted the code alongside the output, showing explicitly what variable (original or transformed) the tests are applied on. You do this at the bottom but not before. $\endgroup$ – Richard Hardy Feb 25 '20 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.