tvgarchSim {tvgarch} | R Documentation |
Simulate from a univariate TV-GARCH-X model
Description
Simulate from a univariate multiplicative TV(s)-GARCH(p,q,r)-X model.
Usage
tvgarchSim(n, order.g = 1, order.h = c(1,1,0),
intercept.g = 1.2, size = 5, speed = 25, location = 0.5, xtv = NULL,
intercept.h = 0.2, arch = 0.1, garch = 0.8, asym = NULL, xreg = NULL,
opt = 0, as.zoo = TRUE, verbose = FALSE, innovations = NULL)
Arguments
n |
|
order.g |
|
order.h |
|
intercept.g |
|
size |
|
speed |
|
location |
|
xtv |
|
opt |
|
intercept.h |
numeric with the value of the intercept in the GARCH-X component. |
arch |
|
garch |
|
asym |
|
xreg |
|
as.zoo |
|
verbose |
|
innovations |
|
Value
An object of class 'zoo' (if as.zoo = TRUE
), otherwise a vector or a matrix
(if verbose = TRUE
), with the simulated values.
Author(s)
Susana Campos-Martins
See Also
Examples
set.seed(123)
## Simulate from a TV(1)-GARCH(1,1) model (default):
ySim1 <- tvgarchSim(n = 1500)
## Simulate from a TV(2)-GARCH(1,1) model:
ySim2 <- tvgarchSim(n = 1500, order.g = c(1,2), size = c(0.5,-0.4),
speed = c(1.5,2), location = c(0.2, 0.5,0.8))
## Simulate from a GARCH(1,1) model:
ySim3 <- tvgarchSim(n = 1500, order.g = NULL)
## Simulate from a TV(1)-GARCH(1,1,1)-X model:
ySim4 <- tvgarchSim(n = 1500, order.h = c(1,1,1), asym = 0.025, xreg = ySim3^2)