[R] Manually reconstructing arima model from coefficients

R. Michael Weylandt michael.weylandt at gmail.com
Fri Apr 20 14:03:19 CEST 2012

Ahh, I understand -- unfortunately, I'm not aware of an easy way to do
this so you'll have to hack your own: this doesn't look too hard
however, if you call


you can get the prediction scheme R uses. It seems that most of the
heavy lifting is already in C so you'd probably be best served by
simply updating the residuals series.


On Tue, Apr 17, 2012 at 9:21 PM, Sergey Samsonov <ssamson at uwo.ca> wrote:
> Michael
> My final goal is to perform forecasting in real time. My historical data
> that is used for training consist of about 2000 samples. Fitting ARIMA model
> x.fit<-arima(x, order = c(5,0,0), seasonal = list(order=c(0,0,1))) takes
> about 3-5 minutes, often I do not have so much time between receiving new
> samples of data. Therefore, I want to re-create my arima model let's say
> only every 50 samples but I want to update my forecast every time new data
> sample arrives (in a real time).
> In other words I want to apply my arima model to forecasting future events
> that will occurre not right after the model was created but some time later
> after a few more intermediate samples were received. I think this problem is
> similar to applying already fitted arima forecasting to a new time series
> object that has similar statistical properties as a tested set, since these
> are the same series just shifted in the future.

More information about the R-help mailing list