
R6 Class representing the specification of the BVARGROUPPANEL model
Source:R/specify_bvargrouppanel.R
specify_bvarGroupPANEL.RdThe class BVARGROUPPANEL presents complete specification for the Bayesian Panel
Vector Autoregression with county groups. The groups can be pre-specified,
which requires the argument group_allocation to be provided, or estimated,
which requires the argument G for the number of groups to be provided
and the argument group_allocation to be left empty.
References
Zellner, Hong (1989). Forecasting international growth rates using Bayesian shrinkage and other procedures. Journal of Econometrics, 40(1), 183–202, doi:10.1016/0304-4076(89)90036-5 .
Public fields
pa non-negative integer specifying the autoregressive lag order of the model.
Ga non-negative integer specifying the number of country groupings.
estimate_groupsa logical value denoting whether the groups are to be estimated.
prioran object PriorBSVAR with the prior specification.
data_matricesan object DataMatricesBVARPANEL with the data matrices.
starting_valuesan object StartingValuesBVARGROUPPANEL with the starting values.
adaptiveMHa vector of four values setting the adaptive MH sampler for nu: adaptive rate, target acceptance rate, the iteration at which to start adapting, the initial scaling rate
Methods
Method new()
Create a new specification of the Bayesian Panel VAR model with country
grouping BVARGROUPPANEL. The groups can be pre-specified,
which requires the argument group_allocation to be provided, or estimated,
which requires the argument G for the number of groups to be provided
and the argument group_allocation to be left empty.
Usage
specify_bvarGroupPANEL$new(
data,
p = 1L,
exogenous = NULL,
stationary = rep(FALSE, ncol(data[[1]])),
type = rep("real", ncol(data[[1]])),
G = NULL,
group_allocation = NULL
)Arguments
dataa list with
Celements of(T_c+p)xNmatrices with time series data.pa positive integer providing model's autoregressive lag order.
exogenousa
(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.typean
Ncharacter vector with elements set to "rate" or "real" determining the truncation of the predictive density to[0, 100]and(-Inf, Inf)(no truncation) for each of the variables.Ga positive integer specifying the number of country groups. Its specification is required if
group_allocationis not provided and the country groups to be estimated.group_allocationan argument that can be provided as a numeric vector with integer numbers denoting group allocations to pre-specify the the country groups, in which case they are not estimated, or left empty if the country groups are to be estimated.
Method set_global2pooled()
Sets the prior mean of the global autoregressive parameters to the OLS pooled panel estimator following Zellner, Hong (1989).
Arguments
xa vector of four values setting the adaptive MH sampler for nu: adaptive rate, target acceptance rate, the iteration at which to start adapting, the initial scaling rate
Examples
spec = specify_bvarGroupPANEL$new(
data = ilo_dynamic_panel,
p = 4,
G = 2
)
spec$set_global2pooled()
Examples
data(ilo_dynamic_panel)
spec = specify_bvarGroupPANEL$new(
data = ilo_dynamic_panel,
p = 4,
G = 2
)
#> Country groupings will be estimated.
## ------------------------------------------------
## Method `specify_bvarGroupPANEL$set_global2pooled`
## ------------------------------------------------
spec = specify_bvarGroupPANEL$new(
data = ilo_dynamic_panel,
p = 4,
G = 2
)
#> Country groupings will be estimated.
spec$set_global2pooled()