spGARCHsim: Simulation of spatial ARCH models

Description Usage Arguments Details Value Control Arguments Author(s) References Examples

Description

The function generates n random numbers of a spatial GARCH process for given parameters and weighting schemes.

Usage

1
2
3
sim.spGARCH(n = dim(W1)[1], rho, lambda, alpha, W1, W2,
            b = 2, zeta = 0.5, theta = 0.5, type = "spGARCH",
            control = list())

Arguments

n

number of observations. If length(n) > 1, the length is taken to be the number required. Default dim(W1)[1]

rho

spatial dependence parameter rho

lambda

spatial dependence parameter lambda

alpha

unconditional variance level alpha

W1

n times n spatial weight matrix (ARCH component, parameter rho)

W2

n times n spatial weight matrix (GARCH component, parameter lambda)

b

parameter b for logarithmic spatial GARCH (only needed if type = "log-spGARCH"). Default 2.

zeta

parameter zeta for exponential spatial GARCH (only needed if type = "e-spGARCH"). Default 0.5.

theta

parameter theta for exponential spatial GARCH (only needed if type = "e-spGARCH"). Default 0.5.

type

type of simulated spGARCH process (see details)

control

list of control arguments (see below)

Details

The function simulates n observations Y = (Y_1, ..., Y_n)' of a spatial GARCH process, i.e.,

Y = diag(h)^(1/2) ε ,

where ε is a spatial White Noise process. The definition of h depends on the chosen type. The following types are available.

Value

The functions returns a vector y.

Control Arguments

Author(s)

Philipp Otto potto@europa-uni.de

References

Philipp Otto, Wolfgang Schmid (2019). Spatial GARCH Models - A Unified Approach. arXiv:1908.08320

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
require("spdep")

# 1st example (spatial GARCH)
##############

# parameters

rho    <- 0.5
lambda <- 0.3
alpha  <- 1
d      <- 5

nblist <- cell2nb(d, d, type = "rook") # lattice process with Rook's contiguity matrix
W_1    <- nb2mat(nblist)
W_2    <- W_1

# simulation

Y      <- sim.spGARCH(rho = rho, lambda = lambda, alpha = alpha,
                      W1 = W_1, W2 = W_2, type = "spGARCH")

# visualization

image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2]))

# 2nd example (exponential spatial GARCH)
##############

# parameters

rho    <- 0.5
lambda <- 0.3
alpha  <- 1
zeta   <- 0.5
theta  <- 0.5
d      <- 5

nblist <- cell2nb(d, d, type = "rook") # lattice process with Rook's contiguity matrix
W_1    <- nb2mat(nblist)
W_2    <- W_1

# simulation

Y      <- sim.spGARCH(rho = rho, lambda = lambda, alpha = alpha,
                      W1 = W_1, W2 = W_2, zeta = zeta, theta = 0.5, type = "e-spGARCH")

# visualization

image(1:d, 1:d, array(Y, dim = c(d,d)), xlab = expression(s[1]), ylab = expression(s[2]))

spGARCH documentation built on Sept. 2, 2020, 9:07 a.m.

Related to spGARCHsim in spGARCH...