有没有办法从auto.arima强制季节性 [英] Is there a way to force seasonality from auto.arima
本文介绍了有没有办法从auto.arima强制季节性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用forecast
软件包,我有一个时间序列,我希望?auto.arima
自动选择订单,但我想强制季节性.该函数的默认值允许将seasonal
参数设置为TRUE
,但这仅允许选择季节性而非强制性.
With the forecast
package, I have a time series that I would like ?auto.arima
to automatically pick the orders but I would like to coerce seasonality. The defaults for the function allow for the seasonal
argument to be set to TRUE
, but that only allows the option for seasonality not a coercion.
auto.arima(x, d=NA, D=NA, max.p=5, max.q=5,
max.P=2, max.Q=2, max.order=5, max.d=2, max.D=1,
start.p=2, start.q=2, start.P=1, start.Q=1,
stationary=FALSE, seasonal=TRUE,
ic=c("aicc", "aic", "bic"), stepwise=TRUE, trace=FALSE,
approximation=(length(x)>100 | frequency(x)>12), xreg=NULL,
test=c("kpss","adf","pp"), seasonal.test=c("ocsb","ch"),
allowdrift=TRUE, allowmean=TRUE, lambda=NULL, biasadj=FALSE,
parallel=FALSE, num.cores=2)
推荐答案
您可以将控制季节性差异的D
参数设置为大于零的值. (默认的NA
允许auto.arima()
使用或不使用季节性.)例如:
You can set the D
parameter, which governs seasonal differencing, to a value greater than zero. (The default NA
allows auto.arima()
to use or not use seasonality.) For example:
> set.seed(1)
> foo <- ts(rnorm(60),frequency=12)
> auto.arima(foo)
Series: foo
ARIMA(0,0,0) with zero mean
sigma^2 estimated as 0.7307: log likelihood=-75.72
AIC=153.45 AICc=153.52 BIC=155.54
> auto.arima(foo,D=1)
Series: foo
ARIMA(0,0,0)(1,1,0)[12]
Coefficients:
sar1
-0.3902
s.e. 0.1478
sigma^2 estimated as 1.139: log likelihood=-72.23
AIC=148.46 AICc=148.73 BIC=152.21
这篇关于有没有办法从auto.arima强制季节性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文