varwg.time_series_analysis.models.VAR_LS

varwg.time_series_analysis.models.VAR_LS(data, p=2, biased=True)[source]

Least-Squares parameter estimation for a vector auto-regressive model of the form Y = B*Z + U. Records containing nans are excluded. Refer to the Least-Squares Estimator example 3.2.3 p.78. for method and variable names.

Parameters:
data(K, T) ndarray

K is the number of variables, T the number of timesteps

pint

Autoregressive order of the process.

Returns:
Barray

Parameters of the fitted VAR-process.

sigma_uarray

Covariance matrix of the residuals.

biasedbool, optional

If true, use the number of non-nan observations (n_obs) to ‘unbias’ sigma_u. Otherwise, use n_obs - K * p - 1.

See also

VAR_order_selection

Helps to find a p for parsimonious estimation.

VAR_residuals

Returns the residuals based on given data and LS estimator

VAR_LS_sim

Simulation based on LS estimator.

VAR_LS_predict

Predict given prior data and LS estimator.