| specify_bsvarSIGN {bsvarSIGNs} | R Documentation |
R6 Class representing the specification of the BSVARSIGN model
Description
The class BSVARSIGN presents complete specification for the Bayesian Structural VAR model with sign and narrative restrictions.
Public fields
pa non-negative integer specifying the autoregressive lag order of the model.
identificationan object IdentificationBSVARSIGN with the identifying restrictions.
prioran object PriorBSVARSIGN with the prior specification.
data_matricesan object DataMatricesBSVARSIGN with the data matrices.
starting_valuesan object StartingValuesBSVARSIGN with the starting values.
Methods
Public methods
Method new()
Create a new specification of the Bayesian Structural VAR model with sign and narrative restrictions BSVARSIGN.
Usage
specify_bsvarSIGN$new( data, p = 1L, sign_irf, sign_narrative, sign_structural, max_tries = Inf, exogenous = NULL, stationary = rep(FALSE, ncol(data)) )
Arguments
dataa
(T+p)xNmatrix with time series data.pa positive integer providing model's autoregressive lag order.
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 restrictionsexogenousa
(T+p)xdmatrix of exogenous variables.stationaryan
Nlogical vector - its element set toFALSEsets the prior mean for the autoregressive parameters of theNth equation to the white noise process, otherwise to random walk.
Returns
A new complete specification for the Bayesian Structural VAR model BSVARSIGN.
Method get_data_matrices()
Returns the data matrices as the DataMatricesBSVAR object.
Usage
specify_bsvarSIGN$get_data_matrices()
Examples
# specify a model with the optimism data and 4 lags data(optimism) spec = specify_bsvarSIGN$new( data = optimism, p = 4 ) # get the data matrices spec$get_data_matrices()
Method get_identification()
Returns the identifying restrictions as the IdentificationBSVARSIGN object.
Usage
specify_bsvarSIGN$get_identification()
Examples
# specify a model with the optimism data and 4 lags data(optimism) spec = specify_bsvarSIGN$new( data = optimism, p = 4 ) # get the identifying restrictions spec$get_identification()
Method get_prior()
Returns the prior specification as the PriorBSVAR object.
Usage
specify_bsvarSIGN$get_prior()
Examples
# specify a model with the optimism data and 4 lags data(optimism) spec = specify_bsvarSIGN$new( data = optimism, p = 4 ) # get the prior specification spec$get_prior()
Method get_starting_values()
Returns the starting values as the StartingValuesBSVAR object.
Usage
specify_bsvarSIGN$get_starting_values()
Examples
# specify a model with the optimism data and 4 lags data(optimism) spec = specify_bsvarSIGN$new( data = optimism, p = 4 ) # get the starting values spec$get_starting_values()
Method clone()
The objects of this class are cloneable with this method.
Usage
specify_bsvarSIGN$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
estimate.BSVARSIGN, specify_posterior_bsvarSIGN
Examples
# specify a model with the optimism data and 4 lags
data(optimism)
specification = specify_bsvarSIGN$new(
data = optimism,
p = 4
)
## ------------------------------------------------
## Method `specify_bsvarSIGN$get_data_matrices`
## ------------------------------------------------
# specify a model with the optimism data and 4 lags
data(optimism)
spec = specify_bsvarSIGN$new(
data = optimism,
p = 4
)
# get the data matrices
spec$get_data_matrices()
## ------------------------------------------------
## Method `specify_bsvarSIGN$get_identification`
## ------------------------------------------------
# specify a model with the optimism data and 4 lags
data(optimism)
spec = specify_bsvarSIGN$new(
data = optimism,
p = 4
)
# get the identifying restrictions
spec$get_identification()
## ------------------------------------------------
## Method `specify_bsvarSIGN$get_prior`
## ------------------------------------------------
# specify a model with the optimism data and 4 lags
data(optimism)
spec = specify_bsvarSIGN$new(
data = optimism,
p = 4
)
# get the prior specification
spec$get_prior()
## ------------------------------------------------
## Method `specify_bsvarSIGN$get_starting_values`
## ------------------------------------------------
# specify a model with the optimism data and 4 lags
data(optimism)
spec = specify_bsvarSIGN$new(
data = optimism,
p = 4
)
# get the starting values
spec$get_starting_values()