Estimates an unbiased VAR(1) using stochastic approximation (Bauer, Rudebusch and Wu, 2012)
Bias_Correc_VAR( ModelType, BRWinputs, RiskFactors, N, Economies, FactorLabels, GVARinputs = NULL, JLLinputs = NULL, ev_restr = 1, nargout = 4 )
ModelType
: A character vector indicating the model type to be estimated.
BRWinputs
: A list containing the necessary inputs for the BRW model estimation:
flag_mean
: Logical. Determines whether mean- (TRUE) or median- (FALSE) unbiased estimation is desired. Default is TRUE.gamma
: Numeric. Adjustment parameter between 0 and 1. Default is 0.5.N_iter
: Integer. Number of iterations for the stochastic approximation algorithm after burn-in. Default is 5,000.N_burn
: Integer. Number of burn-in iterations. Default is 15B
: Integer. Number of bootstrap samples per iteration for calculating the noisy measure of the OLS estimator's mean or median. Default is 50.check
: Logical. Indicates whether to perform a closeness check. Default is TRUE.B_check
: Integer. Number of bootstrap samples for the closeness check. Default is 100,000.RiskFactors
: A numeric matrix (T x F) representing the time series of risk factors.
N
: Integer. Number of country-specific spanned 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.
ev_restr
: Numeric. Restriction on the largest eigenvalue under the P-measure. Default is 1.
nargout
: Integer. Number of elements in the output list. Default is 4.
Bias-corrected VAR parameters based on the framework of Bauer, Rudebusch and Wu (2012). The list contains:
Phi_tilde
: estimated coefficient matrix (F x F);mu_tilde
: estimated intercept (F x 1);V_tilde
: estimated variance-covariance matrix (F x F);dist
: root mean square distance (scalar);Phi_sample
: sample estimated variance-covariance matrix used in the checks (F x F x B_check) - this output is reported if nargout is 5.data(CM_Factors) Factors <- t(RiskFactors[1:7,]) BRWinputs <- list(flag_mean = TRUE, 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, N, Economies, FactorLabels)
Bauer, Rudebusch and, Wu (2012). "Correcting Estimation Bias in Dynamic Term Structure Models"
This function is based on the est_unb_var
Matlab function available at Cynthia Wu's website (https://sites.google.com/view/jingcynthiawu/).
Useful links