Learn R Programming

tswge (version 2.1.0)

gen.arch.wge: Generate a realization from an ARCH(q0) model

Description

Generates a realization of length n from the GARCH(q0) model (4.23) in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott

Usage

gen.arch.wge(n, alpha0, alpha, plot = TRUE,sn=0)

Value

returns the generated realization

Arguments

n

Length of realization to be generated

alpha0

The constant alpha0 in model (4.23)

alpha

A vector of length q0 containing alpha1 through alphaq0

plot

If plot=TRUE (default) the generated realization is plotted

sn

determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time

Author

Wayne Woodward

References

"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott

Examples

Run this code
gen.arch.wge(n=200,alpha0=.1,alpha=c(.36,.27,.18,.09))

Run the code above in your browser using DataLab