I am attempting a VAR model in R with an exogenous variable on:
VARM <- data.frame(y,x1,x2,x3) #x3 is the exogenous variable
First, I want to choose the correct lag order by using VARselect
VARselect(VARM, lag.max = 6, type = "const" , exogen=x3)
I then get the following error : "different row size of y and exogen"
I can't figure out what's causing this. When I view the data frame I have confirmed that the rows are the same and there is no missing observations. I've tried various things to use the x3 variable, but the closest I could get is this error when the VARselect runs:
"No column names supplied in exogen, using: exo1 , instead"