[R-SIG-Finance] Seasonsal ARIMA

Sean O'Riordain seanpor at acm.org
Sat Sep 20 09:29:51 CEST 2008


Kevin,
I'm a complete beginner at timeseries analysis, so with that said..
I've been looking at the forecast package, and it appears to be able
to work in automatic mode if you so desire.

please please take the following with a grain of salt... I don't know
how to manipulate timeseries, so I'm just being a bit "blunt" here...
no doubt somebody will jump in with improvements! :-)

library(forecast)
# btw. gold has a length of 1108 ... but just to make things longer
and add a bit of "seasonal repetition"...
g1 <- as.numeric(unclass(gold))
g2 <- c(g1,g1,g1,g1)
# it appears that forecast doesn't like NAs so I'll just bluntly
interpolate them for the purposes of this demo
fg2 <- forecast(na.interp(g2))
plot(fg2)
# or for a more detailed plot
nl <- length(g2)
plot(fg2, xlim=c(nl-250, nl))

Rob J. Hyndman has a paper "Automatic time series forecasting: the
forecast package for R" at
http://ideas.repec.org/p/msh/ebswps/2007-6.html

Regards,
Sean O'Riordain
Dublin, Ireland
seanpor at acm.org


On Fri, Sep 19, 2008 at 10:03 PM,  <rkevinburton at charter.net> wrote:
> First off let me say that from 'R' calling arima(xdata,    order=c(1,1,1), seasonal=list(order=c(2,1,1), period=12) (an ARIMA(1,1,1)X(2.1.1) 12 model) works just fine (provided that data is monthly). But for my data I have daily data so there are 365 obeservations per year and I have about 4 years of data. With this data and replacing 12 with 365 gives me an error indicating that I cannot set the lag above 350. So I gradually worked my way down and now I have 52 observations pwr year and I am calling arima like:
>
> arima(x,    order=c(1,1,1), seasonal=list(order=c(2,1,1), period=52)
> (an ARIMA(1,1,1)X(2.1.1) 52 model)
>
> Now I am getting an error that I don't understand. It must have something to do with the practicle/numeric limitations of the implementation.
>
> <simpleError in optim(init[mask], armaCSS, method = "BFGS", hessian = FALSE,     control = optim.control): initial value in 'vmmin' is not finite>
>
> So my question to this group is, "what are the practicle limits for using arima to fit data to a seasonal model?" One, I found that I cannot specify a lag larger than 350 either specifically or implicitly with the model that I am building. If the fit takes longer than say 5 minutes I would say that it is impracticle and I need to look for a different solution. Obviously if I get numerical errors like shown above that would be another practicle limitation of the function. So darwing on the experience of this group rather than me going through trial and error what would be the practicle limits of arima? Can these limitations be overcome by possibly another model or other parameters?
>
> Let me give an example. If I want to brute force find 100! at first the response would be that it is impossible, that big of number can't be represented. But there have been a number of solutions to make findiing 100! "practicle". I am looking for the same kind of advice with arima.
>
> Thank you.
>
> Kevin
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>



More information about the R-SIG-Finance mailing list