| specify_identification_bsvarSIGN {bsvarSIGNs} | R Documentation |
R6 Class Representing IdentificationBSVARSIGN
Description
The 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 matrixB.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
Qthat would satisfy sign restrictions.
Methods
Public 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
Qthat would satisfy sign restrictions.
Returns
Identifying restrictions IdentificationBSVARSIGN.
Method get_identification()
Returns the elements of the identification pattern IdentificationBSVARSIGN as a list.
Usage
specify_identification_bsvarSIGN$get_identification()
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
Qthat would satisfy sign restrictions
Method clone()
The objects of this class are cloneable with this method.
Usage
specify_identification_bsvarSIGN$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
# recursive specification for a 5-variable system
specify_identification_bsvarSIGN$new(N = 5)
# 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)