Skip to content
Prev 155777 / 398502 Next

arima and xreg

You can have lagged inputs in the xreg statement, you just have to construct
the input matrix properly so the dimensions are the same, e.g.,

x = ts.intersect(mort, trend, part, lag(part,-4))
arima(x[,1],order=c(2,0,1), xreg=x[,2:4])

... and yes you have to worry about singularities or even multicolinearity
(near or computational singularity), e.g., this fails:

x = ts.intersect(mort, trend, part, part)
arima(x[,1],order=c(2,0,1), xreg=x[,2:4])
Jose Capco wrote:
-----
The power of accurate observation is commonly called cynicism 
by those who have not got it.  George Bernard Shaw