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 |
integer .
|
order.g |
integer vector of length s indicating the number of locations in each transition function of the TV component.
|
order.h |
integer vector of the form c(p,q,r). The first entry controls the GARCH order, the second the ARCH order and the third the asymmetry order of the GARCH-X component.
|
intercept.g |
NULL or numeric with the value of the intercept in the TV component.
|
size |
NULL or numeric vector with the values of the size coefficients.
|
speed |
NULL or numeric vector with the values of the speed coefficients.
|
location |
NULL or numeric vector with the values of the location coefficients.
|
xtv |
NULL or numeric vector , time series or zoo object to include as the transition variable in the TV component. If NULL , calendar time, scaled between 0 and 1, is used as the transition variable.
|
opt |
integer indicating whether the speed parameter in the TV component should be scaled. If 0, no scaling; if 1, speed /sd(xtv ); if 2, exp(speed ).
|
intercept.h |
numeric with the value of the intercept in the GARCH-X component.
|
arch |
NULL or numeric vector with the values of the ARCH-coefficients.
|
garch |
NULL or numeric vector with the values of the GARCH-coefficients.
|
asym |
NULL or numeric vector with the values of the asymmetry-coefficients.
|
xreg |
NULL or numeric vector with the values of the X-term.
|
as.zoo |
logical . If TRUE , then the returned result is of class zoo .
|
verbose |
logical , if TRUE , the conditional variance and innovations are also returned.
|
innovations |
NULL or numeric vector with the innovations. If NULL , then standard normal innovations are generated with rnorm .
|
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
tvgarch
,
garchx
,
zoo
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)
[Package
tvgarch version 2.4.2
Index]