Learn R Programming

MSGARCH (version 0.17.7)

sim: Process simulation method.

Description

Method simulating a MSGARCH process.

Usage

sim(object, n, m, theta, burnin = 500)

Arguments

object
Model specification of class MSGARCH_SPEC created with create.spec.
n
Simulation length. (Default: n = 1000)
m
Number of simulations. (Default: m = 1)
theta
Vector (of size d) or matrix (of size M x d) of parameter estimates.
burnin
(integer >= 0) Burnin period discarded (first simulation draws). (Default: burnin = 500)

Value

A list of class MSGARCH_SIM containing two components.
  • draws: Matrix (of size M x n) of simulated draws.
  • state: Matrix (of size M x n) of simulated states.
The MSGARCH_SIM class contains the plot method.

Details

If a matrix of parameter estimates is given, each parameter estimates is evaluated individually and m = M. The difference between sim and simahead is that sim starts the simulation a t = 0 creating an entire new process while simahead starts the simulation at t = T + 1 taking in consideration all the information available in the original time serie y.

Examples

Run this code
## Not run: 
# # create model specification
# spec = MSGARCH::create.spec() 
# 
# # generate process
# set.seed(123)
# sim = MSGARCH::sim(object = spec, n = 1000, m = 1, theta = spec$theta0, burnin = 500)
# 
# plot(sim)
# ## End(Not run)

Run the code above in your browser using DataLab