The class PriorBVARPANEL presents a prior specification for the Bayesian hierarchical panel VAR model.
Public fields
Man
KxNmatrix, the mean of the second-level MNIW prior distribution for the global parameter matrices \(\mathbf{A}\) and \(\mathbf{V}\)Wa
KxKcolumn-specific covariance matrix of the second-level MNIW prior distribution for the global parameter matrices \(\mathbf{A}\) and \(\mathbf{V}\)S_invan
NxNrow-specific precision matrix of the second-level MNIW prior distribution for the global parameter matrices \(\mathbf{A}\) and \(\mathbf{V}\)S_Sigma_invan
NxNprecision matrix of the second-level Wishart prior distribution for the global parameter matrix \(\mathbf{\Sigma}\).etaa positive shape parameter of the second-level MNIW prior distribution for the global parameter matrices \(\mathbf{A}\) and \(\mathbf{V}\)
mu_Sigmaa positive shape parameter of the second-level Wishart prior distribution for the global parameter matrix \(\mathbf{\Sigma}\).
lambdaa positive shape of the second-level exp prior distribution for the shape parameter \(\nu\).
mu_ma scalar mean of the third-level normal prior distribution for the global average persistence parameter \(m\).
sigma2_ma positive scalar variance of the third-level normal prior distribution for the global average persistence parameter \(m\).
s_wa positive scalar scale of the third-level gamma prior distribution for parameter \(w\).
a_wa positive scalar shape of the third-level gamma prior distribution for parameter \(w\).
s_sa positive scalar scale parameter of the third-level inverted-gamma 2 prior distribution for parameter \(s\).
nu_sa positive scalar shape parameter of the third-level inverted-gamma 2 prior distribution for parameter \(s\).
Methods
Method new()
Create a new prior specification PriorBVARPANEL.
Usage
specify_prior_bvarPANEL$new(C, N, p, d = 0, stationary = rep(FALSE, N))Arguments
Ca positive integer - the number of countries in the data.
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.
Examples
# a prior for 2-country, 3-variable example with one lag and stationary data
prior = specify_prior_bvarPANEL$new(C = 2, N = 3, p = 1)
prior$M
Method get_prior()
Returns the elements of the prior specification PriorBSVAR as a list.
Examples
# a prior for 2-coutnry, 3-variable example with four lags
prior = specify_prior_bvarPANEL$new(C = 2, N = 3, p = 4)
prior$get_prior() # show the prior as list
Examples
prior = specify_prior_bvarPANEL$new(C = 2, N = 3, p = 1)
prior$M
#> [,1] [,2] [,3]
#> [1,] 1 0 0
#> [2,] 0 1 0
#> [3,] 0 0 1
#> [4,] 0 0 0
## ------------------------------------------------
## Method `specify_prior_bvarPANEL$new`
## ------------------------------------------------
# a prior for 2-country, 3-variable example with one lag and stationary data
prior = specify_prior_bvarPANEL$new(C = 2, N = 3, p = 1)
prior$M
#> [,1] [,2] [,3]
#> [1,] 1 0 0
#> [2,] 0 1 0
#> [3,] 0 0 1
#> [4,] 0 0 0
## ------------------------------------------------
## Method `specify_prior_bvarPANEL$get_prior`
## ------------------------------------------------
# a prior for 2-coutnry, 3-variable example with four lags
prior = specify_prior_bvarPANEL$new(C = 2, N = 3, p = 4)
prior$get_prior() # show the prior as list
#> $M
#> [,1] [,2] [,3]
#> [1,] 1 0 0
#> [2,] 0 1 0
#> [3,] 0 0 1
#> [4,] 0 0 0
#> [5,] 0 0 0
#> [6,] 0 0 0
#> [7,] 0 0 0
#> [8,] 0 0 0
#> [9,] 0 0 0
#> [10,] 0 0 0
#> [11,] 0 0 0
#> [12,] 0 0 0
#> [13,] 0 0 0
#>
#> $W
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
#> [1,] 1 0 0 0 0 0 0 0 0 0 0 0 0
#> [2,] 0 1 0 0 0 0 0 0 0 0 0 0 0
#> [3,] 0 0 1 0 0 0 0 0 0 0 0 0 0
#> [4,] 0 0 0 4 0 0 0 0 0 0 0 0 0
#> [5,] 0 0 0 0 4 0 0 0 0 0 0 0 0
#> [6,] 0 0 0 0 0 4 0 0 0 0 0 0 0
#> [7,] 0 0 0 0 0 0 9 0 0 0 0 0 0
#> [8,] 0 0 0 0 0 0 0 9 0 0 0 0 0
#> [9,] 0 0 0 0 0 0 0 0 9 0 0 0 0
#> [10,] 0 0 0 0 0 0 0 0 0 16 0 0 0
#> [11,] 0 0 0 0 0 0 0 0 0 0 16 0 0
#> [12,] 0 0 0 0 0 0 0 0 0 0 0 16 0
#> [13,] 0 0 0 0 0 0 0 0 0 0 0 0 10
#>
#> $S_inv
#> [,1] [,2] [,3]
#> [1,] 1 0 0
#> [2,] 0 1 0
#> [3,] 0 0 1
#>
#> $S_Sigma_inv
#> [,1] [,2] [,3]
#> [1,] 1 0 0
#> [2,] 0 1 0
#> [3,] 0 0 1
#>
#> $eta
#> [1] 4
#>
#> $mu_Sigma
#> [1] 4
#>
#> $lambda
#> [1] 72
#>
#> $mu_m
#> [1] 1
#>
#> $sigma2_m
#> [1] 1
#>
#> $s_w
#> [1] 1
#>
#> $a_w
#> [1] 1
#>
#> $s_s
#> [1] 1
#>
#> $nu_s
#> [1] 3
#>
