statsmodels.tsa.vector_ar.var_model.VAR.predict#
- VAR.predict(params, start=None, end=None, lags=1, trend='c')[source]#
Returns in-sample predictions or forecasts
- Parameters:
- params
ndarray The parameters/coefficients of the VAR model, in the same format as
VARResults.params.- start
int,str,ordatetime,optional Zero-indexed observation number at which to start forecasting, i.e., the first forecast is start.
- end
int,str,ordatetime,optional Zero-indexed observation number at which to end forecasting, i.e., the last forecast is end.
- lags
int The number of lags used in the model.
- trend
str{“n”, “c”, “ct”, “ctt”} The deterministic trend used in the model.
- params
- Returns:
ndarrayArray of in-sample predicted values and/or out-of-sample forecasts.