Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
etsRのパッケージの関数を使用していて、モデルを次のようなforecast単一の時系列に適合させたとしますt
ets
forecast
t
ets_model = ets(t) fcast = forecast(ets_model, h=1)
コンソールに入力すると予測を見ることができますが、fcast実際にこの値を抽出してプログラムの一部として使用するにはどうすればよいでしょうか? の内容を検索しましたがstr(fcast)、実際の予測はどこにも見つかりません。
fcast
str(fcast)
それはfcast$mean:
fcast$mean
fcast <- forecast(ets(rnorm(20)), h = 1) fcast # Point Forecast Lo 80 Hi 80 Lo 95 Hi 95 # 21 -0.06945796 -0.9153854 0.7764694 -1.363192 1.224276 fcast$mean # Time Series: # Start = 21 # End = 21 # Frequency = 1 # [1] -0.06945796