BVAR forecasts
Posted: Sat Apr 10, 2021 1:37 pm
Hi Tom
I am trying to forecast a variable y using BVAR. The variable is given in a log form. My codes are given below where LNY, X1, X2, X3, X4, X5 are non stationary, integrated of order 1, whereas X6 X7 and X8 are stationary variables. I am using m-vector here with hyperparameters of w=0.2, d=2 and k=0.2 on x5 and x8. My questions are the following:
1. the M vector as i understood will take values 1.0 for non stationary and 0.0 for stationary. Am i correct in doing it like this?
2. when i take lag decay parameter as 2 then the interaction input matrix specified in the end will have diagonal elements as 2?
3. if i am controlling for a variable by taking interaction parameter k different from w then the diagonal element of that variable will take value 1 or 2? Can you please explain this?
My codes are:
procedure runtheil
option choice type 1 symmetric general
option rect matrix
option real tightness .2
option real decay 2
option real other .4
option string window
local integer time
system(model=bvar)
variables lny X1 X2 X3 X4 X5 X6 X7 X8
lags 1 to 2
det constant d2
specify(mvector=||1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0||,tightness=.2,type=general,matrix=matrix,lagtype=harmonic, decay=2) other
end(system)
theil(setup,model=bvar) 1 12 2016:07,2017:12
estimate(print) * 2016:06
@regcrits(print)
theil(print)
do time=2016:07;2017:12
Kalman
theil(print)
end do time
theil(dump,window=window)
END
@runtheil(tight=.20,type=general,window="General")
# 1.00 0.40 0.40 0.40 0.40 0.20 0.40 0.40 0.20 $
0.40 1.00 0.40 0.40 0.40 0.20 0.40 0.40 0.20 $
0.40 0.40 1.00 0.40 0.40 0.20 0.40 0.40 0.20 $
0.40 0.40 0.40 1.00 0.40 0.20 0.40 0.40 0.20 $
0.40 0.40 0.40 0.40 1.00 0.20 0.40 0.40 0.20 $
0.40 0.40 0.40 0.40 0.40 1.00 0.40 0.40 0.20 $
0.40 0.40 0.40 0.40 0.40 0.20 1.00 0.40 0.20 $
0.40 0.40 0.40 0.40 0.40 0.20 0.40 1.00 0.20 $
0.40 0.40 0.40 0.40 0.40 0.20 0.40 0.40 1.00
Your help is highly appreciated.
Regards
Deepika
I am trying to forecast a variable y using BVAR. The variable is given in a log form. My codes are given below where LNY, X1, X2, X3, X4, X5 are non stationary, integrated of order 1, whereas X6 X7 and X8 are stationary variables. I am using m-vector here with hyperparameters of w=0.2, d=2 and k=0.2 on x5 and x8. My questions are the following:
1. the M vector as i understood will take values 1.0 for non stationary and 0.0 for stationary. Am i correct in doing it like this?
2. when i take lag decay parameter as 2 then the interaction input matrix specified in the end will have diagonal elements as 2?
3. if i am controlling for a variable by taking interaction parameter k different from w then the diagonal element of that variable will take value 1 or 2? Can you please explain this?
My codes are:
procedure runtheil
option choice type 1 symmetric general
option rect matrix
option real tightness .2
option real decay 2
option real other .4
option string window
local integer time
system(model=bvar)
variables lny X1 X2 X3 X4 X5 X6 X7 X8
lags 1 to 2
det constant d2
specify(mvector=||1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0||,tightness=.2,type=general,matrix=matrix,lagtype=harmonic, decay=2) other
end(system)
theil(setup,model=bvar) 1 12 2016:07,2017:12
estimate(print) * 2016:06
@regcrits(print)
theil(print)
do time=2016:07;2017:12
Kalman
theil(print)
end do time
theil(dump,window=window)
END
@runtheil(tight=.20,type=general,window="General")
# 1.00 0.40 0.40 0.40 0.40 0.20 0.40 0.40 0.20 $
0.40 1.00 0.40 0.40 0.40 0.20 0.40 0.40 0.20 $
0.40 0.40 1.00 0.40 0.40 0.20 0.40 0.40 0.20 $
0.40 0.40 0.40 1.00 0.40 0.20 0.40 0.40 0.20 $
0.40 0.40 0.40 0.40 1.00 0.20 0.40 0.40 0.20 $
0.40 0.40 0.40 0.40 0.40 1.00 0.40 0.40 0.20 $
0.40 0.40 0.40 0.40 0.40 0.20 1.00 0.40 0.20 $
0.40 0.40 0.40 0.40 0.40 0.20 0.40 1.00 0.20 $
0.40 0.40 0.40 0.40 0.40 0.20 0.40 0.40 1.00
Your help is highly appreciated.
Regards
Deepika