forecasting in regARIMA for forward forecast

1 view (last 30 days)
azim on 31 May 2020
i was using a regression model with arima(1,1) errors for forecasting log GDP using CPI for the indian economy data. i'am using the exact code as in the matlab example given in the documentation:
load Data_USEconModel;
logGDP = log(DataTable.GDP);
dlogGDP = diff(logGDP); % For stationarity
dCPI = diff(DataTable.CPIAUCSL); % For stationarity
numObs = length(dlogGDP);
gdp = dlogGDP(1:end-15); % Estimation sample
cpi = dCPI(1:end-15);
T = length(gdp); % Effective sample size
frstHzn = T+1:numObs; % Forecast horizon
hoCPI = dCPI(frstHzn); % Holdout sample
dts = dates(2:end); % Date nummbers
Mdl = regARIMA('ARLags',1,'MALags',1);
EstMdl = estimate(Mdl,gdp,'X',cpi);
[gdpF,gdpMSE] = forecast(EstMdl,15,'Y0',gdp,'X0',cpi,'XF',hoCPI);
the program works nicely for the data if i have to check against a holdout sample. my question is now i do not want to check the forecast against the holdout sample but simple give me a 15 period forward prediction from the current last data. what will this line be now:
[gdpF,gdpMSE] = forecast(EstMdl,15,'Y0',gdp,'X0',cpi,'XF',hoCPI);
what will be 'Y0','X0' and 'XF'?
as the above line checks for the holdout sample i want a forward forecast of the gdp using current values of gdp and cpi?
your help would be much appreciated.

Answers (0)

Community Treasure Hunt

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

Start Hunting!