FittedVAR¶
FittedVAR — reduced-form posterior from Bayesian VAR estimation.
FittedVAR
¶
Bases: BaseModel
Immutable container for a fitted (reduced-form) Bayesian VAR.
Attributes:
| Name | Type | Description |
|---|---|---|
idata |
InferenceData
|
ArviZ InferenceData with posterior draws. |
n_lags |
int
|
Lag order used in estimation. |
data |
VARData
|
Original VARData used for fitting. |
var_names |
list[str]
|
Names of endogenous variables. |
coefficients
property
¶
Posterior draws of B coefficient matrices.
has_exog
property
¶
Whether the model includes exogenous variables.
intercepts
property
¶
Posterior draws of intercept vectors.
sigma
property
¶
Posterior draws of residual covariance matrix.
forecast(steps, exog_future=None)
¶
Produce h-step-ahead forecasts from the reduced-form posterior.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
steps
|
int
|
Number of forecast steps. |
required |
exog_future
|
ndarray | None
|
Future exogenous values, shape (steps, k). Required if model has exog. |
None
|
Returns:
| Type | Description |
|---|---|
ForecastResult
|
ForecastResult with posterior forecast draws. |
set_identification_strategy(scheme)
¶
Apply a structural identification scheme.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scheme
|
IdentificationScheme
|
An IdentificationScheme protocol instance (e.g. Cholesky). |
required |
Returns:
| Type | Description |
|---|---|
IdentifiedVAR
|
IdentifiedVAR with structural shock matrix in the posterior. |