statsmodels.tsa.vector_ar.var_model.VARResults¶
-
class
statsmodels.tsa.vector_ar.var_model.
VARResults
(endog, endog_lagged, params, sigma_u, lag_order, model=None, trend='c', names=None, dates=None, exog=None)[source]¶ Estimate VAR(p) process with fixed number of lags
- Parameters
endog : ndarray
endog_lagged : ndarray
params : ndarray
sigma_u : ndarray
lag_order : int
model : VAR model instance
trend : str {‘nc’, ‘c’, ‘ct’}
names : array_like
List of names of the endogenous variables in order of appearance in endog.
dates
exog : ndarray
Attributes
coefs
(ndarray (p x K x K)) Estimated A_i matrices, A_i = coefs[i-1]
dates
endog
endog_lagged
k_ar
(int) Order of VAR process
k_trend
(int)
model
names
neqs
(int) Number of variables (equations)
nobs
(int)
n_totobs
(int)
params
(ndarray (Kp + 1) x K) A_i matrices and intercept in stacked form [int A_1 … A_p]
names
(list) variables names
resid
sigma_u
(ndarray (K x K)) Estimate of white noise process variance Var[u_t]
tvalues
y :
ys_lagged
Methods
acf
([nlags])Compute theoretical autocovariance function
acorr
([nlags])Autocorrelation function
Estimated variance-covariance of model coefficients
cov_ybar
()Asymptotically consistent estimate of covariance of the sample mean
fevd
([periods, var_decomp])Compute forecast error variance decomposition (“fevd”)
forecast
(y, steps[, exog_future])Produce linear minimum MSE forecasts for desired number of steps ahead, using prior values y
forecast_cov
([steps, method])Compute forecast covariance matrices for desired number of steps
forecast_interval
(y, steps[, alpha, exog_future])Construct forecast interval estimates assuming the y are Gaussian
get_eq_index
(name)Return integer position of requested equation name
Long run intercept of stable VAR process
irf
([periods, var_decomp, var_order])Analyze impulse responses to shocks in system
irf_errband_mc
([orth, repl, steps, signif, …])Compute Monte Carlo integrated error bands assuming normally distributed for impulse response functions
irf_resim
([orth, repl, steps, seed, burn, cum])Simulates impulse response function, returning an array of simulations.
is_stable
([verbose])Determine stability based on model coefficients
Compute long-run effect of unit impulse
ma_rep
([maxn])Compute MA(\(\infty\)) coefficient matrices
mean
()Long run intercept of stable VAR process
mse
(steps)Compute theoretical forecast error variance matrices
orth_ma_rep
([maxn, P])Compute orthogonalized MA coefficient matrices using P matrix such that \(\Sigma_u = PP^\prime\).
plot
()Plot input time series
plot_acorr
([nlags, resid, linewidth])Plot autocorrelation of sample (endog) or residuals
plot_forecast
(steps[, alpha, plot_stderr])Plot forecast
plot_sample_acorr
([nlags, linewidth])Plot sample autocorrelation function
plotsim
([steps, offset, seed])Plot a simulation from the VAR(p) process for the desired number of steps
reorder
(order)Reorder variables for structural specification
resid_acorr
([nlags])Compute sample autocorrelation (including lag 0)
resid_acov
([nlags])Compute centered sample autocovariance (including lag 0)
sample_acorr
([nlags])Sample acorr
sample_acov
([nlags])Sample acov
simulate_var
([steps, offset, seed])simulate the VAR(p) process for the desired number of steps
summary
()Compute console output summary of estimates
test_causality
(caused[, causing, kind, signif])Test Granger causality
test_inst_causality
(causing[, signif])Test for instantaneous causality
test_normality
([signif])Test assumption of normal-distributed errors using Jarque-Bera-style omnibus Chi^2 test.
test_whiteness
([nlags, signif, adjusted])Residual whiteness tests using Portmanteau test
to_vecm
()Methods
acf
([nlags])Compute theoretical autocovariance function
acorr
([nlags])Autocorrelation function
Estimated variance-covariance of model coefficients
cov_ybar
()Asymptotically consistent estimate of covariance of the sample mean
fevd
([periods, var_decomp])Compute forecast error variance decomposition (“fevd”)
forecast
(y, steps[, exog_future])Produce linear minimum MSE forecasts for desired number of steps ahead, using prior values y
forecast_cov
([steps, method])Compute forecast covariance matrices for desired number of steps
forecast_interval
(y, steps[, alpha, exog_future])Construct forecast interval estimates assuming the y are Gaussian
get_eq_index
(name)Return integer position of requested equation name
Long run intercept of stable VAR process
irf
([periods, var_decomp, var_order])Analyze impulse responses to shocks in system
irf_errband_mc
([orth, repl, steps, signif, …])Compute Monte Carlo integrated error bands assuming normally distributed for impulse response functions
irf_resim
([orth, repl, steps, seed, burn, cum])Simulates impulse response function, returning an array of simulations.
is_stable
([verbose])Determine stability based on model coefficients
Compute long-run effect of unit impulse
ma_rep
([maxn])Compute MA(\(\infty\)) coefficient matrices
mean
()Long run intercept of stable VAR process
mse
(steps)Compute theoretical forecast error variance matrices
orth_ma_rep
([maxn, P])Compute orthogonalized MA coefficient matrices using P matrix such that \(\Sigma_u = PP^\prime\).
plot
()Plot input time series
plot_acorr
([nlags, resid, linewidth])Plot autocorrelation of sample (endog) or residuals
plot_forecast
(steps[, alpha, plot_stderr])Plot forecast
plot_sample_acorr
([nlags, linewidth])Plot sample autocorrelation function
plotsim
([steps, offset, seed])Plot a simulation from the VAR(p) process for the desired number of steps
reorder
(order)Reorder variables for structural specification
resid_acorr
([nlags])Compute sample autocorrelation (including lag 0)
resid_acov
([nlags])Compute centered sample autocovariance (including lag 0)
sample_acorr
([nlags])Sample acorr
sample_acov
([nlags])Sample acov
simulate_var
([steps, offset, seed])simulate the VAR(p) process for the desired number of steps
summary
()Compute console output summary of estimates
test_causality
(caused[, causing, kind, signif])Test Granger causality
test_inst_causality
(causing[, signif])Test for instantaneous causality
test_normality
([signif])Test assumption of normal-distributed errors using Jarque-Bera-style omnibus Chi^2 test.
test_whiteness
([nlags, signif, adjusted])Residual whiteness tests using Portmanteau test
to_vecm
()Properties
Akaike information criterion
Bayesian a.k.a.
Standard errors of coefficients, reshaped to match in size
Return determinant of white noise covariance with degrees of freedom correction:
Number of estimated parameters, including the intercept / trends
Number of observations minus number of estimated parameters
The predicted insample values of the response variables of the model.
Final Prediction Error (FPE)
Hannan-Quinn criterion
information criteria for lagorder selection
Compute VAR(p) loglikelihood
Two-sided p-values for model coefficients from Student t-distribution
pvalues_endog_laggd
Residuals of response variable resulting from estimated coefficients
Centered residual correlation matrix
The roots of the VAR process are the solution to (I - coefs[0]*z - coefs[1]*z**2 …
(Biased) maximum likelihood estimate of noise process covariance
Standard errors of coefficients, reshaped to match in size
Stderr_dt
Stderr_endog_lagged
Compute t-statistics.