View source: R/BiasCorrection.R
Bias_Correc_VAR | R Documentation |
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:
|
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 |
JLLinputs |
List. Inputs for JLL model estimation (see |
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.
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/).
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.