Skip to contents

Estimates an unbiased VAR(1) using stochastic approximation (Bauer, Rudebusch and Wu, 2012)

Usage

Bias_Correc_VAR(
  ModelType,
  BRWinputs,
  RiskFactors,
  Economies,
  FactorLabels,
  GVARinputs = NULL,
  JLLinputs = NULL,
  verbose = TRUE
)

Arguments

ModelType

A character vector indicating the model type to be estimated.

BRWinputs

A list containing the necessary inputs for the BRW model estimation:

  1. Cent_Measure: Determines whether "Mean" or "Median"-unbiased estimation is desired.

  2. gamma: Numeric. Adjustment parameter between 0 and 1. Default is 0.5.

  3. N_iter: Integer. Number of iterations for the stochastic approximation algorithm after burn-in. Default is 5,000.

  4. N_burn: Integer. Number of burn-in iterations. Default is 15

  5. B: Integer. Number of bootstrap samples per iteration for calculating the noisy measure of the biased estimator's mean or median. Default is 50.

  6. check: Logical. Indicates whether to perform a closeness check. Default is TRUE.

  7. B_check: Integer. Number of bootstrap samples for the closeness check. Default is 100,000.

  8. Eigen_rest: Numeric. Restriction on the largest eigenvalue under the P-measure. Default is 1.

RiskFactors

A numeric matrix (T x F) representing the time series of risk factors.

Economies

A character vector containing the names of the economies included in the system.

FactorLabels

A list of character vectors with labels for all variables in the model.

GVARinputs

List. Inputs for GVAR model estimation (see GVAR function). Default is NULL.

JLLinputs

List. Inputs for JLL model estimation (see JLL function). Default is NULL.

verbose

verbose Logical flag controlling function messaging. Default is TRUE.

Value

Bias-corrected VAR parameters based on the framework of Bauer, Rudebusch and Wu (2012). The list contains:

  1. KOZ_BC: estimated intercept (F x 1);

  2. K1Z_BC: estimated feedback matrix (F x F);

  3. SSZ_BC: estimated variance-covariance matrix (F x F);

  4. dist: root mean square distance (scalar);

References

Bauer, Rudebusch and, Wu (2012). "Correcting Estimation Bias in Dynamic Term Structure Models"
An R implementation inspired by the methodology described therein. Related Matlab routines are available on Cynthia Wu's website (https://sites.google.com/view/jingcynthiawu/).

Examples

# \donttest{
data(CM_Factors)
Factors <- t(RiskFactors[1:7,])

BRWinputs <- list(Cent_Measure = "Mean", gamma = 0.4, N_iter = 1000, N_burn = 100,
                  B = 10, check = 1, B_check = 5000)

Economies <- "China"
N <- 3
ModelType <- "JPS original"
FactorLabels <- NULL

BRWpara <- Bias_Correc_VAR(ModelType, BRWinputs, Factors, Economies, FactorLabels)
#> iteration:  100  /  1099
#> iteration:  200  /  1099
#> iteration:  300  /  1099
#> iteration:  400  /  1099
#> iteration:  500  /  1099
#> iteration:  600  /  1099
#> iteration:  700  /  1099
#> iteration:  800  /  1099
#> iteration:  900  /  1099
#> iteration:  1000  /  1099
#> Root mean square distance:  0.048839
#> ... Done! 
# }