[Rd] maximum supported lag is 350

Matteo Bertini matteo at naufraghi.net
Wed Jul 22 16:26:51 CEST 2009


I have found a strange error:

 > fit = Arima(flow, c(1,0,1), list(order=c(0,1,1), period=96*7))
Error in makeARIMA(trarma[[1L]], trarma[[2L]], Delta, kappa) :
   maximum supported lag is 350

Is in fact quite common to have a lag > 350 using a weekly period in 
15min steps = 672 (standard in traffic flow prediction litterature for 
example).

Is there any reasons against doing what is suggested in the comment and 
avoid the hardcoded limit?

Thanks,
Matteo Bertini



# https://svn.r-project.org/R/trunk/src/library/stats/src/arima.c
SEXP getQ0(SEXP sPhi, SEXP sTheta)
{

[----8<----]

     /* This is the limit using an int index.  We could use
        size_t and get more on a 64-bit system,
        but there seems no practical need. */
     if(r > 350) error(_("maximum supported lag is 350"));



More information about the R-devel mailing list