varwg.time_series_analysis.models.VAREX_LS

varwg.time_series_analysis.models.VAREX_LS(data, p, ex)[source]

Least-Squares parameter estimation for a vector auto-regressive model of the form

..math::y_t = A_1 y_{t-1} + … + A_p y_{t-p} + C x_t + u_t

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

ex(T,) ndarray

An external variable

pint

Autoregressive order of the process.

Returns:
Barray

Parameters of the fitted VAR-process. B := (A_1, …, A_p, C)

sigma_u: array

Covariance matrix of the residuals of the data.

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.