Bias_Correc_VAR {MultiATSM} | R Documentation |
Estimate an unbiased VAR(1) using stochastic approximation (Bauer, Rudebusch and Wu, 2012)
Description
Estimate an unbiased VAR(1) using stochastic approximation (Bauer, Rudebusch and Wu, 2012)
Usage
Bias_Correc_VAR(
ModelType,
BRWinputs,
RiskFactors,
N,
Economies,
FactorLabels,
GVARinputs = NULL,
JLLinputs = NULL,
ev_restr = 1,
nargout = 4
)
Arguments
ModelType |
string-vector containing the label of the model to be estimated |
BRWinputs |
List containing the following necessary inputs for the estimation of the BRW model:
|
RiskFactors |
time series of the risk factors (T x F) |
N |
number of country-specific spanned factors (scalar) |
Economies |
string-vector containing the names of the economies which are part of the economic system |
FactorLabels |
string-list based which contains the labels of all variables present in the model |
GVARinputs |
inputs used in the estimation of the GVAR-based models (see "GVAR" function). Default is set to NULL |
JLLinputs |
inputs used in the estimation of the JLL-based models (see "JLL" function). Default is set to NULL |
ev_restr |
largest eigenvalue restriction under the P-measure. Default is set to 1 |
nargout |
number of elements present in the list of outputs. Default is set to 4 |
Value
Bias-corrected VAR paramaters 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 set to 5.
References
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/).
Examples
data(CM_Factors)
Factors <- t(RiskFactors[1:7,])
BRWinputs <- list()
BRWinputs$flag_mean <- TRUE
BRWinputs$gamma <- 0.4
BRWinputs$N_iter <- 1000
BRWinputs$N_burn <- 100
BRWinputs$B <- 10
BRWinputs$check <- 1
BRWinputs$B_check <- 5000
Economies <- "China"
N <- 3
ModelType <- "JPS"
FactorLabels <- NULL
BRWpara <- Bias_Correc_VAR(ModelType, BRWinputs, Factors, N, Economies, FactorLabels)