I am trying to model exogenous events with (according to Juselius (2007 pg. 106)) dummy variables. From quoted literature we can see that there are three type of dummy variables. Mean-shift dummy variables (. . . ,0,0,0,1,1,1,. . . ), permanent blip dummy variables (. . . ,0,0,1,0,0,. . . ), and shock dummy variables (. . . ,0,0,1,−1,0,0,. . . ). The question can I include such a type of variables in my VECM. In r I used the following packages:
library(readxl)
library(tsDyn)
library(vars)
library(urca)
library(forecast)
library(tidyverse)
library(tseries)
library("moments")
Thus, I used the variables from urca package. And I did the following in order to make seasonal dummy variable:
data(finland)
lev = finland
nr_lev = nrow(lev)
# the sample period
yq = expand.grid(1:4, 1958:1984)[1:nr_lev,]
colnames(yq) <- c('q', 'y')
rownames(yq) = NULL
# quarterly centered dummy variables
yq$Q1 = (yq$q==1)
yq$Q2 = (yq$q==2)
yq$Q3 = (yq$q==3)
dum_season = yq[,-c(1:2)]
m <- VECM(lev,3,r=2,estim = ("ML"),exogen = dum_season)
ctest1 <- ca.jo(lev,type='trace',ecdet = 'const',K = 3)
summary(ctest1)
m <- vec2var(ctest1,r=2)
serial1 <- serial.test(m,lags.pt = 1enter code here2,type = "PT.adjusted")
serial1
# Arch test
Arch1 <- arch.test(m,lags.multi = 12,multivariate.only = T)
Arch1
# Normality
Norm <- normality.test(m,multivariate.only = T)
Norm
The point is that when i use dummy variables in VECM function then i should change the statistics related to skewness and kurtosis as well as standard deviation (and multivariate test statistics for normality in VAR model).
The problem is that I don't get that, so I think that model package is not working well for dummy variables. Can someone help, comment or advise for further solution for this problem?