Identification Schemes¶
Identification schemes for structural VAR analysis.
Cholesky
¶
Bases: BaseModel
Cholesky identification scheme.
Uses the lower-triangular Cholesky decomposition of the residual covariance matrix to identify structural shocks. Variable ordering determines the causal ordering.
Attributes:
| Name | Type | Description |
|---|---|---|
ordering |
list[str]
|
Ordered list of variable names (most exogenous first). |
identify(idata, var_names)
¶
Apply Cholesky identification to posterior covariance draws.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idata
|
InferenceData
|
InferenceData with 'Sigma' in posterior. |
required |
var_names
|
list[str]
|
Variable names from the VAR model. |
required |
Returns:
| Type | Description |
|---|---|
InferenceData
|
InferenceData with 'structural_shock_matrix' added to posterior. |
SignRestriction
¶
Bases: BaseModel
Sign restriction identification scheme.
Uses random rotation matrices to find structural impact matrices satisfying sign restrictions on impulse responses.
Attributes:
| Name | Type | Description |
|---|---|---|
restrictions |
dict[str, dict[str, str]]
|
Dict mapping variable -> {shock_name: "+" or "-"}. |
n_rotations |
int
|
Number of candidate rotations per draw. |
random_seed |
int | None
|
Seed for reproducibility. |
identify(idata, var_names)
¶
Apply sign restriction identification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
idata
|
InferenceData
|
InferenceData with 'Sigma' in posterior. |
required |
var_names
|
list[str]
|
Variable names from the VAR model. |
required |
Returns:
| Type | Description |
|---|---|
InferenceData
|
InferenceData with 'structural_shock_matrix' added to posterior. |