Learn R Programming

tsDyn (version 0.9-44)

coefB: 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 VECM coefB(object, ...)

# S3 method for ca.jo coefB(object, r = 1, normalize = TRUE, ...)

coefA(object, ...)

# S3 method for VECM coefA(object, ...)

# S3 method for ca.jo coefA(object, r = 1, normalize = TRUE, ...)

coefPI(object, ...)

Arguments

object

An object of class VECM, ca.jo

r

The cointegrating rank

normalize

Whether to normalize the A/B coefficients. See details

Further arguments passed to methods

Value

A matrix containing the coefficients

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\dot 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 standard one followed by Johansen (1995, p. 72), standardising the first $$r\times r$$ coefficients to $$I_r$$:

B

$$B_{norm}=B (c^{'}B)^{-1}$$ with $$c=(I_r,0_{p-r,r})^{'}$$

A

$$A_{norm}=B^{'}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.

Examples

Run this code
# NOT RUN {
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)
}
# }

Run the code above in your browser using DataLab