Learn R Programming

emhawkes (version 0.9.0)

hsim: Simulate a multivariate Hawkes process. Generic function hsim.

Description

Simulate a multivariate Hawkes process. Generic function hsim.

The method simulate multivariate Hawkes processes. The object hspec-class contains the parameter values such as mu, alpha, beta. The mark (jump) structure may or may not be included. It returns an object of class hreal which contains inter_arrival, arrival, type, mark, N, Nc, lambda, lambda_component, rambda, rambda_component.

Usage

hsim(object, size = 100, lambda0 = NULL, N0 = NULL)

# S4 method for hspec hsim(object, size = 100, lambda0 = NULL, N0 = NULL)

Arguments

object

hspec-class. This object includes the parameter values.

size

the number of observations.

lambda0

the starting values of lambda component. numeric or matrix.

N0

the starting values of N

Value

hreal S3-object, summary of the realization of the Haweks model

Examples

Run this code
# NOT RUN {
mu <- c(0.1, 0.1)
alpha <- matrix(c(0.2, 0.1, 0.1, 0.2), nrow=2, byrow=TRUE)
beta <- matrix(c(0.9, 0.9, 0.9, 0.9), nrow=2, byrow=TRUE)
h <- new("hspec", mu=mu, alpha=alpha, beta=beta)
res <- hsim(h, size=100)

# }

Run the code above in your browser using DataLab