| specify_prior_bsvar {bsvars} | R Documentation |
R6 Class Representing PriorBSVAR
Description
The class PriorBSVAR presents a prior specification for the homoskedastic bsvar model.
Public fields
Aan
NxKmatrix, the mean of the normal prior distribution for the parameter matrixA.A_V_inva
KxKprecision matrix of the normal prior distribution for each of the row of the parameter matrixA. This precision matrix is equation invariant.B_V_invan
NxNprecision matrix of the generalised-normal prior distribution for the structural matrixB. This precision matrix is equation invariant.B_nua positive integer greater of equal than
N, a shape parameter of the generalised-normal prior distribution for the structural matrixB.hyper_nu_Ba positive scalar, the shape parameter of the inverted-gamma 2 prior for the overall shrinkage parameter for matrix
B.hyper_a_Ba positive scalar, the shape parameter of the gamma prior for the second-level hierarchy for the overall shrinkage parameter for matrix
B.hyper_s_BBa positive scalar, the scale parameter of the inverted-gamma 2 prior for the third-level of hierarchy for overall shrinkage parameter for matrix
B.hyper_nu_BBa positive scalar, the shape parameter of the inverted-gamma 2 prior for the third-level of hierarchy for overall shrinkage parameter for matrix
B.hyper_nu_Aa positive scalar, the shape parameter of the inverted-gamma 2 prior for the overall shrinkage parameter for matrix
A.hyper_a_Aa positive scalar, the shape parameter of the gamma prior for the second-level hierarchy for the overall shrinkage parameter for matrix
A.hyper_s_AAa positive scalar, the scale parameter of the inverted-gamma 2 prior for the third-level of hierarchy for overall shrinkage parameter for matrix
A.hyper_nu_AAa positive scalar, the shape parameter of the inverted-gamma 2 prior for the third-level of hierarchy for overall shrinkage parameter for matrix
A.
Methods
Public methods
Method new()
Create a new prior specification PriorBSVAR.
Usage
specify_prior_bsvar$new(N, p, d = 0, stationary = rep(FALSE, N))
Arguments
Na positive integer - the number of dependent variables in the model.
pa positive integer - the autoregressive lag order of the SVAR model.
da positive integer - the number of
exogenousvariables in the model.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 prior specification PriorBSVAR.
Examples
# a prior for 3-variable example with one lag and stationary data prior = specify_prior_bsvar$new(N = 3, p = 1, stationary = rep(TRUE, 3)) prior$A # show autoregressive prior mean
Method get_prior()
Returns the elements of the prior specification PriorBSVAR as a list.
Usage
specify_prior_bsvar$get_prior()
Examples
# a prior for 3-variable example with four lags prior = specify_prior_bsvar$new(N = 3, p = 4) prior$get_prior() # show the prior as list
Method clone()
The objects of this class are cloneable with this method.
Usage
specify_prior_bsvar$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
prior = specify_prior_bsvar$new(N = 3, p = 1) # a prior for 3-variable example with one lag
prior$A # show autoregressive prior mean
## ------------------------------------------------
## Method `specify_prior_bsvar$new`
## ------------------------------------------------
# a prior for 3-variable example with one lag and stationary data
prior = specify_prior_bsvar$new(N = 3, p = 1, stationary = rep(TRUE, 3))
prior$A # show autoregressive prior mean
## ------------------------------------------------
## Method `specify_prior_bsvar$get_prior`
## ------------------------------------------------
# a prior for 3-variable example with four lags
prior = specify_prior_bsvar$new(N = 3, p = 4)
prior$get_prior() # show the prior as list