Plot the fit of an ARIMA Model

14 ビュー (過去 30 日間)
Arthur Enders
Arthur Enders 2019 年 2 月 21 日
コメント済み: Seemant Tiwari 2024 年 1 月 29 日
Hello,
I've created an ARIMA Model with the Econometrics Toolbox. I also easily managed to recreate this model manually with the arima and estimate functions. Now I want to predict the values using the model, plot it against the real values and calculate the RMSE of the predicted values. The econometric modeler does plot the fit of the model (seen in the pdf at Figure 1.1.) but I do not find any function to recreate this plot or the predicted values manually.
Is there an easy way to do this? Or do I have to manually include the equation myself?
Thank you in advance and kind regards
A. Enders

採用された回答

Matthias Bär
Matthias Bär 2019 年 4 月 3 日
編集済み: Matthias Bär 2019 年 4 月 3 日
After digging 2 hours through different Matlab examples i finally found the answer. See below and try it.
load(fullfile(matlabroot,'examples','econ','Data_Airline.mat'))
y = log(Data);
T = length(y);
Mdl = arima('Constant',0,'D',1,'Seasonality',12,...
'MALags',1,'SMALags',12);
EstMdl = estimate(Mdl,y);
residuals = infer(EstMdl,y);
prediction = y+residuals;
figure()
plot(y)
hold on
plot(prediction)
Good luck ;)
  3 件のコメント
Jerry Yang
Jerry Yang 2022 年 3 月 25 日
residual = y - y_hat
so that y_hat = y - residual?
Seemant Tiwari
Seemant Tiwari 2024 年 1 月 29 日
can you tell me, how are you calculating these value like constant (?), variance (?), sar (?), Sma (?). ??

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConditional Mean Models についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by