garchxSim {garchx} | R Documentation |
Simulate from a GARCH-X model
Description
Simulate from a GARCH(q,p,r)-X model. Optionally, if verbose=TRUE
, the conditional variance and innovations are also returned.
Usage
garchxSim(n, intercept = 0.2, arch = 0.1, garch = 0.8, asym = NULL, xreg = NULL,
innovations = NULL, backcast.values = list(), verbose = FALSE, as.zoo = TRUE,
c.code = TRUE)
Arguments
n |
integer |
intercept |
numeric |
arch |
|
garch |
|
asym |
|
xreg |
|
innovations |
|
backcast.values |
|
verbose |
|
as.zoo |
|
c.code |
|
Value
a numeric vector or matrix with the simulated values.
Author(s)
Genaro Sucarrat, http://www.sucarrat.net/
See Also
Examples
##simulate from a garch(1,1):
y <- garchxSim(1000)
##simulate from a garch(1,1) with asymmetry/leverage:
yy <- garchxSim(1000, asym=0.1)
##simulate from a garch(1,1) w/user-provided backcast values:
yyy <- garchxSim(1000, backcast.values=list(z2=1, sigma2=0.5))