pyeeg.models.fit_var
- pyeeg.models.fit_var(x, nlags=1, time_axis=0)
Fit a VAR model to a time series.
Instead of fitting k independent models as in fit_ar, this function fits a single model but with multivariate regressors.
- Parameters:
- Returns:
betas – Coefficients of the vector autoregressive model.
betas[i, tau, j]is the coefficient linking channeljat lagtauto the current value of channeli.- Return type:
ndarray (nchans, nlags, nchans)