
R6 Class Representing IdentificationBSVARSIGN
Source:R/specify.R
specify_identification_bsvarSIGN.RdThe class IdentificationBSVARSIGN presents the identifying restrictions for the Bayesian Structural VAR models with sign and narrative restrictions.
Public fields
VBa list of
Nmatrices determining the unrestricted elements of matrix \(B\).sign_irfa
NxNxHarray of sign restrictions on the impulse response functions.sign_narrativea
ANYx6matrix of narrative sign restrictions.sign_structurala
NxNmatrix of sign restrictions on contemporaneous relations.max_triesa positive integer with the maximum number of iterations for finding a rotation matrix \(Q\) that would satisfy sign restrictions.
Methods
Method new()
Create new identifying restrictions IdentificationBSVARSIGN.
Usage
specify_identification_bsvarSIGN$new(
N,
sign_irf,
sign_narrative,
sign_structural,
max_tries = Inf
)Arguments
Na positive integer - the number of dependent variables in the model.
sign_irfa
NxNxHarray - sign and zero restrictions on the impulse response functions, ±1 for positive/negative sign restriction 0 for zero restrictions and NA for no restrictions, theh-th sliceNxNmatrix contains the restrictions on theh-1horizon.sign_narrativea list of objects of class "narrative" - narrative sign restrictions.
sign_structurala
NxNmatrix with entries ±1 or NA - sign restrictions on the contemporaneous relationsBbetween reduced-form errorsEand structural shocksUwhereBE=U.max_triesa positive integer with the maximum number of iterations for finding a rotation matrix \(Q\) that would satisfy sign restrictions.
Method get_identification()
Returns the elements of the identification pattern IdentificationBSVARSIGN as a list.
Method set_identification()
Set new starting values StartingValuesBSVARSIGN.
Usage
specify_identification_bsvarSIGN$set_identification(
N,
sign_irf,
sign_narrative,
sign_structural
)Arguments
Na positive integer - the number of dependent variables in the model.
sign_irfa
NxNxHarray - sign and zero restrictions on the impulse response functions, ±1 for positive/negative sign restriction 0 for zero restrictions and NA for no restrictions, theh-th sliceNxNmatrix contains the restrictions on theh-1horizon.sign_narrativea list of objects of class "narrative" - narrative sign restrictions.
sign_structurala
NxNmatrix with entries ±1 or NA - sign restrictions on the contemporaneous relationsBbetween reduced-form errorsEand structural shocksUwhereBE=U.max_triesa positive integer with the maximum number of iterations for finding a rotation matrix \(Q\) that would satisfy sign restrictions
Examples
# recursive specification for a 5-variable system
specify_identification_bsvarSIGN$new(N = 5)
#> <IdentificationBSVARSIGN>
#> Public:
#> VB: list
#> clone: function (deep = FALSE)
#> get_identification: function ()
#> initialize: function (N, sign_irf, sign_narrative, sign_structural, max_tries = Inf)
#> max_tries: Inf
#> set_identification: function (N, sign_irf, sign_narrative, sign_structural)
#> sign_irf: NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA ...
#> sign_narrative: list
#> sign_structural: 1 NA NA NA NA NA 1 NA NA NA NA NA 1 NA NA NA NA NA 1 NA ...
# specify sign restrictions of the first shock on the contemporaneous IRF
# + no effect on the first variable
# + positive effect on the second variable
sign_irf = matrix(c(0, 1, rep(NA, 23)), 5, 5)
specify_identification_bsvarSIGN$new(N = 5, sign_irf = sign_irf)
#> <IdentificationBSVARSIGN>
#> Public:
#> VB: list
#> clone: function (deep = FALSE)
#> get_identification: function ()
#> initialize: function (N, sign_irf, sign_narrative, sign_structural, max_tries = Inf)
#> max_tries: Inf
#> set_identification: function (N, sign_irf, sign_narrative, sign_structural)
#> sign_irf: 0 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA N ...
#> sign_narrative: list
#> sign_structural: NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA ...