View source: R/sim_vecm_ardl.R
sim_vecm_ardl | R Documentation |
Generate data from a VECM/ARDL equation
sim_vecm_ardl( nobs, case = 1, sigma.in = diag(3), gamma.in, Axx.in, ayxUC.in, ayy.in, mu.in, eta.in, azeroy.in = 0, aoney.in = 0, burn.in, seed.in = NULL )
nobs |
number of observations. |
case |
case related to intercept and trend |
sigma.in |
error covariance matrix. |
gamma.in |
list of short-run parameter matrices |
Axx.in |
long-run relationships between the independent variables |
ayxUC.in |
long-run unconditional relationship between dependent and independent variables, \mathbf a_{yx}^{(UC)} . The second component ayxC, derived from conditioning, is calculated as\mathbf a_{yx}^{(C)}= - \boldsymbolω'\mathbf A_{xx} |
ayy.in |
long-run relationship for the dependent variable a_{yy} |
mu.in |
VAR intercept vector |
eta.in |
VAR trend vector |
azeroy.in |
Conditional ARDL intercept. Overridden if CASE I or CASE II |
aoney.in |
Conditional ARDL trend. Overridden if CASE IV |
burn.in |
burn-in number of observations |
seed.in |
optional seed number for random error generation. |
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Σ.
omega
: the \boldsymbolω vector of parameters generated via conditioning
At
: the conditional long-run parameter matrix \tilde{\mathbf A}
ayx1
: the unconditional subvector of the ARDL equation \mathbf a_{y.x}^{UC}
ayx
: the conditional subvector of the ARDL equation a_{y.x}=a_{y.x}^{UC}-ω'A_{xx}
gammalist
: the list of unconditional \boldsymbolΓ_j parameter matrices
psilist
: the list of conditional \boldsymbolψ_{y.x,j} parameter matrices
azero
: the unconditional VECM intercept
azero.c
: the conditional VECM intercept
interc.ardl
: the conditional ARDL intercept
aone
: the unconditional VECM trend
aone.c
: the conditional VECM trend
interc.ardl
: the conditional ARDL trend
vmu
: the VAR intercept
veta
: the VAR trend
#PARAMETERS #Sigma corrm = matrix(0, ncol = 3, nrow = 3) corrm[2,1] = 0.25 corrm[3,1] = 0.4 corrm[3,2] = -0.25 Corrm = (corrm + t(corrm)) + diag(3) sds = diag(c(1.3, 1.2, 1)) Sigma = (sds %*% Corrm %*% 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), ayxUC.in = c(0.5,0.6), ayy.in = 0.7, mu.in = rep(0.3, 3), eta.in = rep(0, 3), azeroy.in = 0.4, aoney.in = 0, burn.in = 50, seed.in = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.