varwg.time_series_analysis.models.VAR_LS_predict

varwg.time_series_analysis.models.VAR_LS_predict(data_past, B, sigma_u, T=1, n_realizations=1)[source]

Based on a least squares estimator, predict a time-series of the form ..math::y(t) = nu + A1*y(t-1) + … + Ap*y(t-p) + ut B contains (nu, A1, …, Ap).

Parameters:
data_past(K, p) ndarray
B(K, p * K + 1) ndarray

Parameters of the VAR-process of order p.

sigma_u(K, K) ndarray

Covariance matrix of the residuals of the VAR-process.

Tint

Number of timesteps to predict.

n_realizationsint

Number of realizations. If > 1, gaussian disturbances are added. So if n_realizations=1, the prediction is a best guess.

Returns:
Y(K, T) or (K, T, n_realizations) ndarray

References

See p. 707f