simulate {GARCH.X} | R Documentation |
Simulate GARCHX model
Description
Simulates Time series data from GARCH model with exogenous covariates
Usage
simulate(n, omega, alpha, beta, delta = 2, X, pi, shock.distr = "Normal", valinit = 200)
Arguments
n |
Desired length of simulated time series data |
omega |
Coefficient value for omega, required to be
|
alpha |
ARCH Coefficient value, required to be
|
beta |
GARCH Coefficient value, required to be
|
delta |
Value of the power of the time series to allow for Power GARCHX, default is 2 for GARCHX |
X |
Matrix with exogenous covariates where the number of rows is equal to the length of n + valinit |
pi |
Vector containing coefficients for exogenous covariates. |
shock.distr |
Distribution of the shock eta_t that multiply w_t in the GARCH-X model eps_ = w_t*eta_t. |
valinit |
Initialization value, default value is 200 |
Value
A named list containing vector of Time Series data and X covariates used
Examples
n <- 200
d <- 4
valinit <- 100
n2 <- n + d + 1
omega <- 0.05
alpha <- 0.05
beta <- 0.05
delta <- 2
pi <- rep(0.05, d)
e<-rnorm(n2+valinit)
Y<-e
for (t in 2:n2)
Y[t]<- 0.2*Y[t-1]+e[t]
x<-exp(Y)
X <- matrix(0, nrow = (n+valinit), ncol = length(pi))
for(j in 1:d)
X[, j] <- x[(d+2-j):(n+d+1-j+valinit)]
data <- simulate(n, omega, alpha, beta, delta, X, pi, valinit = valinit)
[Package GARCH.X version 1.0 Index]