pvecm: Panel VECM! This is a function named 'pvecm' which estimate...

Description Usage Arguments Examples

View source: R/pvecm.R

Description

Panel VECM! This is a function named 'pvecm' which estimate panel VECM as in Pedroni 2019 (10.1016/b978-0-12-814367-4.00010-1) and Canning and Pedroni 2008 (10.1111/j.1467-9957.2008.01073.x).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
pvecm(
  right_hand_side,
  left_hand_side,
  I_0_dols = NULL,
  cross_sections,
  time,
  dummies = NULL,
  method = "D",
  deterministic_long = "none",
  deterministic_short = "drift",
  vecm_lags = 2,
  maximum_lags = 3,
  kernel = "ba",
  aic_small = TRUE,
  bandwidth = "and",
  n.lead = NULL,
  n.lag = NULL,
  kmax = "k4",
  info.crit = "AIC",
  demeaning = FALSE,
  check = TRUE
)

Arguments

right_hand_side

A numeric dataframe containing all the I(1) regressors.

left_hand_side

A numeric dataframe containing the dependent variable.

I_0_dols

A numeric dataframe containing all the I(1) regressors. Only valid if mehtod = "D" (the long run cointegrated vector is obtained by DOLS).

cross_sections

A numeric dataframe containing the index for the cross sections. It should contain consecutive integers starting from 1.

time

A numeric dataframe containing the index for time.

dummies

A numeric dataframe containing dummies to include in the short-run equations.

method

It can be "D" if the long run cointegrated vector is obtained by DOLS or it can be "FM" if obtained by FMOLS. Default is "D". See documentation for cointReg package.

deterministic_long

Deterministic variables to include in the long run cointegrated vector. It can be "none", "drift" or "trend". Default is "drift". See documentation for cointReg package.

deterministic_short

Deterministic variables to include in the sort run cointegrated vector. It can be "drift" or "trend". Default is "drift". See documentation for cointReg package.

vecm_lags

Lags to include in the VECM systems.

maximum_lags

If you want to use the AIC, the Modified AIC or BIC information criterias, here you set the maximum number of lags that you want to consider. To compare models, you change the argument vecm_lags and use the section 'aic.each.vecm' or 'bic.each.vecm' (for example, my_vecm_estimation$aic.each.vecm) of the obtained object to compare models. Unfortunately, in the current version this need to be done manually. In other words, if you consider a maximum number of lags of 4 (maximum_lags = 4), you should set vecm_lags = 1 and after vecm_lags = 2 and vecm_lags = 3 and vecm_lags = 4 to compare models

kernel

See documentation for cointReg package.

aic_small

Indicates that the Modified AIC and not the AIC will be used when determined the optimal lags in the VECMS

bandwidth

See documentation for cointReg package.

n.lead

See documentation for cointReg package.

n.lag

See documentation for cointReg package.

kmax

See documentation for cointReg package.

info.crit

See documentation for cointReg package.

demeaning

See documentation for cointReg package. Always FALSE in the current version.

check

See documentation for cointReg package.

Examples

1
2
3
4
data("Grunfeld", package = "plm")
sales <- pvecm(Grunfeld[c(3,4)], Grunfeld[5], cross_sections = Grunfeld[1], time = Grunfeld[2],
deterministic_long = "drift", vecm_lags = 2)
print(sales)

ReynaldoSenra/pvecm documentation built on Feb. 18, 2022, 1:35 a.m.