| as.varx | R Documentation |
varx' objectCoerce into a 'varx' object. On top of the parent class
'varx', the child class 'id' is imposed if the input object
to be transformed contains an SVAR model.
as.varx(x, ...)
x |
A VAR object to be transformed. |
... |
Additional arguments to be passed to or from methods. |
as.varx is used as an intermediary in the pvars
functions to achieve compatibility with different classes of VAR objects.
If the user wishes to extend this compatibility with further classes, she
may simply specify accordant as.varx-methods instead of altering
the original pvars function. Classes already covered by pvars
are those of the vars ecosystem, in particular the classes
'varest' for reduced-form VAR estimates from VAR,
'vec2var' for reduced-form VECM estimates from vec2var,
'svarest' for structural VAR estimates from BQ,
'svecest' for structural VECM estimates from SVEC, and
'svars' for structural VAR estimates from svars'
id.chol, id.cvm, or id.dc.
By transformation to 'varx', these VAR estimates can thus be subjected
to pvars' bootstrap procedure sboot.mb and S3 methods
such as summary and toLatex.
A list of class 'varx'. Objects of this class contain the elements:
A |
Matrix. The lined-up VAR coefficient matrices |
B |
Matrix. The |
beta |
Matrix. The |
SIGMA |
Matrix. The |
The following integers indicate the size of dimensions:
dim_K |
Integer. The number of endogenous variables |
dim_S |
Integer. The number of identified shocks |
dim_T |
Integer. The number of time periods |
dim_p |
Integer. The lag-order |
dim_r |
Integer. The cointegration rank |
Some further elements required for the bootstrap functions are:
y |
Matrix. The |
D, D1, D2 |
Matrices. The |
resid |
Matrix. The |
args_varx |
List of characters and integers indicating the estimator and specifications that have been used. |
args_id |
List of characters and integers indicating the identification
methods and specifications that have been used. This element is specific
to the child-class ' |
data("PCIT")
names_k = c("APITR", "ACITR", "PITB", "CITB", "GOV", "RGDP", "DEBT")
# estimate reduced-form VAR and coerce into 'varx' object #
R.vars = vars::VAR(PCIT[ , names_k], p=4, type="const")
as.varx(R.vars)
# identify structural VAR and coerce into 'id' object #
R.svar = svars::id.chol(R.vars, order_k=names_k)
as.varx(R.svar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.