How to forecasting using arima model

21 views (last 30 days)
Yuni Wulandari
Yuni Wulandari on 16 Feb 2021
load 'sst.dat'
y = log(sst);
T = length(y);
Mdl = arima(1,1,1);
EstMdl = estimate(Mdl,y);
[yF,yMSE] = forecast(EstMdl,60,y);
upper = yF + 1.96*sqrt(yMSE);
lower = yF - 1.96*sqrt(yMSE);
figure
plot(y,'Color',[.75,.75,.75])
hold on
h1 = plot(T+1:T+60,yF,'r','LineWidth',2);
h2 = plot(T+1:T+60,upper,'k--','LineWidth',1.5);
plot(T+1:T+60,lower,'k--','LineWidth',1.5)
xlim([0,T+60])
title('Forecast and 95% Forecast Interval')
legend([h1,h2],'Forecast','95% Interval','Location','NorthWest')
hold off
my question :
what's wrong with this code [yF,yMSE] = forecast(EstMdl,60,y); so it comes up "Parameters must be a character."?

Answers (0)

Categories

Find more on System Identification Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!