| as.pvarx | R Documentation |
pvarx' objectCoerce into a 'pvarx' object. On top of the parent class
'pvarx', the child class 'pid' is imposed if the input object
to be transformed contains a panel SVAR model.
as.pvarx(x, w = NULL, ...)
x |
A panel VAR object to be transformed. |
w |
Numeric, logical, or character vector.
|
... |
Additional arguments to be passed to or from methods. |
as.pvarx is used as an intermediary in the pvars
functions to achieve compatibility with different classes of panel VAR objects.
If the user wishes to extend this compatibility with further classes, she
may simply specify accordant as.pvarx-methods instead of
altering the original pvars function.
A list of class 'pvarx'. Objects of this class contain the elements:
A |
Matrix. The lined-up coefficient matrices |
B |
Matrix. The |
beta |
Matrix. The |
L.varx |
List of |
args_pvarx |
List of characters and integers indicating the estimator and specifications that have been used. |
args_pid |
List of characters and integers indicating the identification methods and specifications that have been used. This element is specific to the child-class 'pid' for panel SVAR models, that inherit from parent-class 'pvarx' for any panel VAR model. |
data("PCAP")
names_k = c("g", "k", "l", "y") # variable names
names_i = levels(PCAP$id_i) # country names
L.data = sapply(names_i, FUN=function(i)
ts(PCAP[PCAP$id_i==i, names_k], start=1960, end=2019, frequency=1),
simplify=FALSE)
L.vars = lapply(L.data, FUN=function(x) vars::VAR(x, p=2, type="both"))
as.pvarx(L.vars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.