| sim_vecm_ardl {bootCT} | R Documentation |
Generate data from a VECM/ARDL equation
Description
Generate data from a VECM/ARDL equation
Usage
sim_vecm_ardl(
nobs,
case = 1,
sigma.in,
gamma.in,
axx.in,
ayx.uc.in,
ayy.in,
mu.in = NULL,
eta.in = NULL,
azero.in = NULL,
aone.in = NULL,
burn.in = nobs * 0.5,
seed.in = NULL
)
Arguments
nobs |
number of observations. |
case |
case related to intercept and trend |
sigma.in |
error covariance matrix |
gamma.in |
list of VECM short-run parameter matrices |
axx.in |
long-run relationships between the independent variables |
ayx.uc.in |
long-run unconditional relationship between dependent and independent variables, |
ayy.in |
long-run relationship for the dependent variable |
mu.in |
VAR intercept vector |
eta.in |
VAR trend vector |
azero.in |
VECM intercept |
aone.in |
VECM trend |
burn.in |
burn-in number of observations |
seed.in |
optional seed number for random error generation. |
Value
A list that includes
-
dims: a vector with the dataset dimension -
case: the case given as input -
data: the generated data -
diffdata: the data first difference -
ut: the generated random error matrix. -
sigma: the error covariance matrix\boldsymbol\Sigma. -
omega: the\boldsymbol\omegavector of parameters generated via conditioning -
at: the conditional long-run parameter matrix\widetilde{\mathbf A} -
ayy: the coefficient weighting the EC term,a_{yy} -
ayx.uc: the unconditional subvector of the ARDL equation\mathbf a_{yx} -
ayx2: the conditioning effect\omega'A_{xx} -
ayx.c: the conditional subvector of the ARDL equation\widetilde{a}_{y.x}=a_{yx}-\omega'A_{xx} -
gammalist: the list of unconditional\boldsymbol\Gamma_jparameter matrices -
psilist: the list of conditional\boldsymbol\gamma_{y.x,j}parameter matrices -
vmu: the VAR intercept\boldsymbol\mu -
veta: the VAR trend\boldsymbol\eta -
azero: the unconditional VECM intercept\boldsymbol\alpha_0 -
aone: the unconditional VECM trend\boldsymbol\alpha_1 -
azero.c: the conditional VECM intercept\boldsymbol\alpha_0^c -
aone.c: the conditional VECM trend\boldsymbol\alpha_1^c -
interc.ardl: the conditional ARDL intercept\alpha_{0.y}(case > 2) -
trend.ardl: the conditional ARDL trend\alpha_{1.y}(case = 5) -
theta0: the\theta_0coefficient in the EC term (case = 2) -
theta1: the\theta_1coefficient in the EC term (case = 4) -
interc.ec: the conditional ARDL intercept derived from the EC tem\alpha^{EC}_{0.y}(case = 2) -
trend.ec: the conditional ARDL trend derived from the EC tem\alpha^{EC}_{1.y}(case = 4)
Examples
#PARAMETERS
#Sigma
corrm = matrix(0, ncol = 3, nrow = 3)
corrm[2,1] = 0.25
corrm[3,1] = 0.4
corrm[3,2] = -0.25
corrs = (corrm + t(corrm)) + diag(3)
sds = diag(c(1.3, 1.2, 1))
sigma = (sds %*% corrs %*% t(sds))
#Gamma
gammax = list()
gammax[[1]] = matrix(c(0.6, 0, 0.2, 0.1, -0.3, 0, 0, -0.3, 0.2), nrow = 3, ncol = 3, byrow = TRUE)
gammax[[2]] = matrix(c(0.2, 0, 0.1, 0.05, -0.15, 0, 0, 0, 0.1), nrow = 3, ncol = 3, byrow = TRUE)
#DATA GENERATION
data_sim = sim_vecm_ardl(nobs = 200,
case = 3,
sigma.in = sigma,
gamma.in = gammax,
axx.in = matrix(c(0.3, 0.5, 0.4, 0.3), nrow = 2, ncol = 2),
ayx.uc.in = c(0.5,0.6),
ayy.in = 0.7,
mu.in = rep(0, 3),
eta.in = rep(0, 3),
azero.in = rep(0.4, 3),
aone.in = rep(0, 3),
burn.in = 50,
seed.in = 10)