coefB {tsDyn} | R Documentation |
Extract cointegration parameters A, B and PI
Description
Extract parameters in VECM: adjustment coefficients A
,
cointegrating coefficients B
, or the composite matrix PI
Usage
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, ...)
Arguments
object |
|
r |
The cointegrating rank |
normalize |
Whether to normalize the A/B coefficients. See details |
... |
Further arguments passed to methods |
Details
The functions extract the parameters from a VECM with K
variables
and rank r
:
- A
Adjustment coefficients, of dim
K \times r
- B
Cointegrating coefficients, of dim
K \times r
- Pi
Matrix
\Pi=A B^{'}
, of dimK \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
B_{norm}=B (c^{'}B)^{-1}
withc=(I_r,0_{K-r,r})^{'}
- A
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.
Value
A matrix containing the coefficients
Author(s)
Matthieu Stigler
References
Johansen, Soren, (1995), Likelihood-Based Inference in Cointegrated Vector Autoregressive Models, Oxford University Press
Examples
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)
}