Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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 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

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

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 Π=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 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} 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.

Value

A matrix containing the coefficients

Author(s)

Matthieu Stigler

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)
}

tsDyn

Nonlinear Time Series Models with Regime Switching

v10-1.2
GPL (>= 2)
Authors
Antonio Fabio Di Narzo [aut], Jose Luis Aznarte [ctb], Matthieu Stigler [aut], Ho Tsung-wu [cre]
Initial release
2020-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.