RegArchSim: Simulation of the model

Description Usage Arguments Value Examples

View source: R/RRegArch.R

Description

This function returns a simulation of the model.

Usage

1
    RegArchSim(nSimul, model)

Arguments

nSimul

integer : number of observations generated

model

a RegArchModelClass object describing the model. See modelSet

Value

A list with:

Yt

The vector of objervations

mt

The vector of conditional means

ht

The vector of conditional variances

ut

The vector of conditional residuals

Epst

The vector of standardized conditional residuals

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 # AR2 model with constant
    mm1 <- meanSet(AR=c(0.1,0.2), CONST=2.0)
 # GARCH(2,1) model 
    hh2 <- varSet(GARCH=list(ConstVar=.1, ARCH=c(.1, .2), GARCH=c(.6)))
 # set Student with 10 dof conditional distribution
    rr2 <- residualsSet('STUDENT', 10)
 #set AR2 - GARCH(2,1) model with Student residuals
    model1 <- modelSet(mm1, hh2, rr2)
 # Simulation of the model
    Value <- RegArchSim(nSimul=1000, model1)

RRegArch documentation built on May 2, 2019, 4:59 p.m.