There are 3 types of tests for the residual autocorrelations here (I have a relatively small sample(58 obs):
# Asymptotic Portmanteau test for serially correlated errors
# Portmanteau Test (adjusted) for small samples
serial.test(var1, lags.pt = 16, type = "PT.adjusted")#serial correlation
serial.test(var2, lags.pt = 16, type = "PT.adjusted")#no serial correlation on 10%
serial.test(var3, lags.pt = 16, type = "PT.adjusted")#serial correlation
serial.test(var4, lags.pt = 16, type = "PT.adjusted")#serial correlation
# Breusch-Godfrey LM test for small samples (Edgerton-Shukur F test)
serial.test(var1, lags.bg = 5, type = "ES")# no serial correlation
serial.test(var2, lags.bg = 5, type = "ES")# no serial correlation
serial.test(var3, lags.bg = 5, type = "ES")# no serial correlation
serial.test(var4, lags.bg = 5, type = "ES")# no serial correlation
##Test for Autocorrelations
#H0=No autocorrelation
Box.test(resid1[,1],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid1[,2],lag=3,type="Ljung-Box")# Autocorrelation on 5%
Box.test(resid1[,3],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid1[,4],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid1[,5],lag=3,type="Ljung-Box")# Autocorrelation on 5%
Box.test(resid2[,1],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid2[,2],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid2[,3],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid2[,4],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid2[,5],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid3[,1],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid3[,2],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid3[,3],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid3[,4],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid3[,5],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid4[,1],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid4[,2],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid4[,3],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid4[,4],lag=3,type="Ljung-Box")# No Autocorrelation
Box.test(resid4[,5],lag=3,type="Ljung-Box")# No Autocorrelation
How do I know that I can rely on the results based on this lag (h=3)?
Do I need to specify fitdf
and how?
Can I leave the default lags.pt = 16
and lags.bg = 5
?
Given that the selection criteria show:
VARselect(DATA[5:58,], lag.max = 4, type = "none")
AIC(n) HQ(n) SC(n) FPE(n)
4 1 1 2 ,
do I have enough justification that the VAR(2) model is the best fit based on the tests results above (besides the normality tests favor VAR(2) as well)?
How do I know if to include a const or not (in this case not included type = "none"
)
Many thanks in advance for help and I would be really grateful if some references are available.