dirconn.VarFit#
- class dirconn.VarFit(coefs: ndarray, noise_cov: ndarray, residuals: ndarray, regressor_cov: ndarray, order: int, n_obs: int, ridge: float, demeaned: bool, mean: ndarray, names: tuple[str, ...], sfreq: float)#
A fitted VAR model.
- coefs#
coefs[k - 1, target, source], the layout ofstatsmodelsVARResults.coefs.- Type:
ndarray, shape (order, n_channels, n_channels)
- noise_cov#
Residual covariance with the degrees-of-freedom correction
n_obs - n_channels * order.- Type:
ndarray, shape (n_channels, n_channels)
- residuals#
Residuals of the pooled regression, trial after trial (only the rows that were used, for masked data).
- Type:
ndarray, shape (n_obs, n_channels)
- regressor_cov#
Covariance of the lagged regressors,
X^T X / n_obsof the design oflagged_design()(after demeaning, without the ridge penalty): row and column(k - 1) * n_channels + jbelong to channeljat lagk. Withnoise_covit gives the asymptotic covariance of the least-squares coefficients,noise_cov (x) inv(regressor_cov) / n_obs.- Type:
ndarray, shape (order * n_channels, order * n_channels)
- order#
Number of lags.
- Type:
int
- n_obs#
Number of regression rows (the samples that were predicted, over all trials; for masked data the rows selected by
row_mask()).- Type:
int
- ridge#
Relative ridge penalty used (0 for plain least squares).
- Type:
float
- demeaned#
Whether the per-channel mean over trials and time was removed before fitting.
- Type:
bool
- mean#
The mean that was removed (zeros when
demeanedis false).- Type:
ndarray, shape (n_channels,)
- names#
Channel names.
- Type:
tuple of str
- sfreq#
Sampling frequency in Hz.
- Type:
float
- __init__(coefs: ndarray, noise_cov: ndarray, residuals: ndarray, regressor_cov: ndarray, order: int, n_obs: int, ridge: float, demeaned: bool, mean: ndarray, names: tuple[str, ...], sfreq: float) None#
Methods
__init__(coefs, noise_cov, residuals, ...)Attributes