LoginSignup
0
0

More than 5 years have passed since last update.

auto.arimaで学習した結果はあるんだけど,best modelの次数を忘れちゃった時

Posted at

単なるメモ注意.

model <- auto.arima(x, trace=T, stepwize=T, seasonal=T)
# (中略)

Best model: ARIMA(3,0,2)(0,1,0)[1008]

って学習しても,周期の入れ方とか学習期間とかが大量にあると,best modelなんて覚えてられないよね.

どこに格納されているのか探してみる.

> objects(model)
 [1] "aic"       "aicc"      "arma"      "bic"       "call"      "code"      "coef"      "fitted"    "loglik"    "mask"     
[11] "model"     "n.cond"    "nobs"      "residuals" "series"    "sigma2"    "var.coef"  "x"        

うーむ,modelかarmaが怪しい.
で,うっかりmodelを見ようとすると,学習データが入っているのでデータ数が多い時は注意.
Rがしばらく固まる.

> cts.arima$arma
[1]    3    2    0    0 1008    0    1

あった.

前から順に AR次数,MA次数,季節要素のAR次数,季節要素のMA次数,季節要素の期間,差分,季節要素の差分.

よくよく読めば,ドキュメントに書いてあんだけどね.
bestmodelって属性作って文字列として格納しておいてくれれば便利なのにー.

arma
A compact form of the specification, as a vector giving the number of AR, MA, seasonal AR and seasonal MA coefficients, plus the period and the number of non-seasonal and seasonal differences.
arima function | R Documentation

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0