arimaPredict¶
Purpose¶
Estimates forecasts using estimation results obtained from arimaFit()
.
Format¶
-
f =
arimaPredict
(b, y, e, h)¶ - Parameters
b (Kx1 vector) – estimated coefficients
y (Nx1 vector) – data.
e (Nx1 vector) – residuals reported by arimamt program.
h (scalar) – the number of step-ahead forecasts to computer.
- Returns
f (hx3 matrix) –
\([.,1]\)
Lower forecast confidence bounds.
\([.,2]\)
Forecasts.
\([.,3]\)
Upper forecast confidence bounds.
Example¶
new;
cls;
library tsmt;
//Simulate data
seed = 423458;
y = simarmamt(.3, 1, 0, 2, 0, 250, 1, .5, seed);
//Integrated series
z = cumsumc(y);
//Declare arima out structures
struct arimamtOut amo;
//Set AR order
p = 1;
//Set order of differencing
d = 1;
//Estimate model
amo = arimaFit(z, p, d);
//Forecast model
f = arimaPredict(amo.b, z, amo.e, 25);
Remarks¶
Data must be transformed before being sent to arimaPredict.
arimaPredict does not compute forecasts for models with fixed regressors.
Library¶
tsmt
Source¶
forecastmt.src