Reputation: 1
While trying to create ARIMA models for half-hour time series data, auto.arima would not automatically include seasonality, despite apparent (daily) seasonality. When specifying D = 1 when calling auto.arima (as instructed here), the ARIMA model returns the following error:
Error in if (length(dx) > ncol(dxreg)) lm(dx ~ dxreg - 1, na.action = na.omit) else list(rank = 0L) :
argument is of length zero
Have included a minimal reproducible example below
structure(c(860.110666666667, 0, 0, 0, 0, 0, 0, 0, 1795.942,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1233.68133333333, 0, 0, 0, 0, 2460.29066666667, 1910.628, 3026.91,
1313.402, 587.111666666667, 1389.328, 0, 425.473666666667, 2676.30433333333,
359.064, 598.866666666667, 0, 0, 0, 0, 0, 0, 826.639333333333,
0, 0, 0, 0, 0, 525.482333333333, 600.823333333333, 0, 1293.36533333333,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383.521333333333,
0, 0, 0, 0, 0, 0, 739.561, 3241.267, 2820.05166666667, 3262.343,
1779.022, 1406.778, 631.806666666667, 3261.663, 25.2043333333333,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1120.446, 931.430666666667, 329.675,
167.672, 2957.59733333333, 0, 0, 0, 0, 0, 0, 486.451666666667,
1210.21233333333, 0, 1192.211, 0, 0, 0, 0, 0, 0, 1899.427, 0,
0, 0, 0, 0, 0, 717.466333333333, 0, 0, 0, 2421.93233333333, 3231.43766666667,
1160.77066666667, 2315.53966666667, 3252.93833333333, 3210.40633333333,
1805.097, 1445.225), .Tsp = c(1505352600, 1505352600.00816, 17520
), class = "ts")
aa <- forecast::auto.arima(dfts, D = 1)
Upvotes: 0
Views: 403
Reputation: 31800
You define a time series of length 144 with frequency equal to 17520 and then ask for a seasonal difference -- i.e., a difference between observations that are 17520 time periods apart -- which can't be done.
The error message is not very helpful -- I'll get that fixed.
Upvotes: 1