coefB | R Documentation |
Extract parameters in VECM: adjustment coefficients A
,
cointegrating coefficients B
, or the composite matrix PI
coefB(object, ...)
## S3 method for class 'VECM'
coefB(object, ...)
## S3 method for class 'ca.jo'
coefB(object, r = 1, normalize = TRUE, ...)
coefA(object, ...)
## S3 method for class 'VECM'
coefA(object, ...)
## S3 method for class 'ca.jo'
coefA(object, r = 1, normalize = TRUE, ...)
coefPI(object, ...)
object |
An object of class |
r |
The cointegrating rank |
normalize |
Whether to normalize the A/B coefficients. See details |
... |
Further arguments passed to methods |
The functions extract the parameters from a VECM with K
variables
and rank r
:
Adjustment coefficients, of dim K \times r
Cointegrating coefficients, of dim K \times r
Matrix \Pi=A B^{'}
, of dim K \times K
Coefficients are extracted from a VECM in package tsDyn
, or from a VECM
obtained in package urca
from ca.jo
or cajorls
.
Note that by default, the A and B coefficients returned are normalized (see below). This is
the case for results obtained from VECM
/lineVar
and
cajorls
, while for ca.jo
, the user has the choice
(but normalize=TRUE by default), in which case the rank r
is also to be specified.
The normalization is the Phillips triangular representation, as suggested by Johansen (1995, p. 72),
standardising the first r\times r
coefficients to I_r
:
B_{norm}=B (c^{'}B)^{-1}
with c=(I_r,0_{K-r,r})^{'}
A_{norm}=AB^{'}c
Finally, note that the function also apply to objects obtained from tests of class
ca.jo.test
(from blrtest
etc...). Care should be taken
however, since the normalization might override the restrictions imposed.
A matrix containing the coefficients
Matthieu Stigler
Johansen, Soren, (1995), Likelihood-Based Inference in Cointegrated Vector Autoregressive Models, Oxford University Press
data(barry)
vecm <- VECM(barry, lag=1, estim="ML")
vecm_r2 <- VECM(barry, lag=1, estim="ML", r=2)
## extract coefficients:
coefA(vecm)
coefB(vecm)
coefPI(vecm)
coefB(vecm_r2)
coefPI(vecm_r2)
## Beta-Restricted VECM:
beta_vecm2 <- coefB(vecm_r2)
beta_vecm2[3,2] <- 0.02
vecm_r2_rest <- VECM(barry, lag=1, estim="ML", r=2, beta=beta_vecm2)
round(coefB(vecm_r2_rest),5)
## Package vars/urca
if(require(urca)){
vecm_ur <- ca.jo(barry, K=2)
coefB(vecm_ur)
coefB(vecm_ur,r=2)
coefB(cajorls(vecm_ur, r=2))
all.equal(coefB(vecm), coefB(vecm_ur), check.attributes=FALSE)
all.equal(coefB(vecm_r2), coefB(vecm_ur, r=2), check.attributes=FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.