math - Arima.sim issues in R -
i working on making prediction in r using time-series models. used auto.arima function find model dataset (which ts object). fit<-auto.arima(data) can plot results of prediction 20 following dates using forecast function:
plot(forecast(fit,h=20)) however add external variables , cannot using forecast because kind of black box me new r. tried mimic using arima.sim function , problem arose: how initialize function ? got model setting model=as.list(coef(fit)) other parameters still obscure me. went through hundreds of page including in stackoverflow nobody seems know going on. how calculated ? why n.start (the burn-in period) must have ma+ar length , not max(ar,ma) length ? start.innov? thought understood when there ar part cannot reproduce results ar+ma filter. understanding ar concerned start.innov represent errors between filtered zero-signal , true signal, true ? if want have ar of order 2 initial conditions (a1,a2) need set
start.innov[1]=a1-ar1*0-ar2*0=a1 start.innov[2]=a2-ar1*start.innov[1] and innov rep(0,20) when facing arima function how set innov same curbs forecast ? !!!
you seem confused between modelling , simulation. wrong auto.arima().
auto.arima() does allow exogenous variables via xreg argument. read file. can include exogenous variables future periods using forecast.arima(). again, read file.
it not clear @ why referring arima.sim() here. simulating arima processes, not modelling or forecasting.
Comments
Post a Comment