statsmodels.tsa.ar_model.AR.predict¶
-
AR.
predict
(params, start=None, end=None, dynamic=False)[source]¶ Construct in-sample and out-of-sample prediction.
- Parameters
- params
ndarray
The fitted model parameters.
- start
int
,str
,or
datetime
Zero-indexed observation number at which to start forecasting, ie., the first forecast is start. Can also be a date string to parse or a datetime type.
- end
int
,str
,or
datetime
Zero-indexed observation number at which to end forecasting, ie., the first forecast is start. Can also be a date string to parse or a datetime type.
- dynamicbool
The dynamic keyword affects in-sample prediction. If dynamic is False, then the in-sample lagged values are used for prediction. If dynamic is True, then in-sample forecasts are used in place of lagged dependent variables. The first forecasted value is start.
- params
- Returns
- array_like
An array containing the predicted values.
Notes
The linear Gaussian Kalman filter is used to return pre-sample fitted values. The exact initial Kalman Filter is used. See Durbin and Koopman in the references for more information.