hsim {emhawkes} | R Documentation |
Simulate multivariate Hawkes process with exponential kernel.
Description
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, lambda_component0 = NULL, N0 = NULL, ...)
## S4 method for signature 'hspec'
hsim(object, size = 100, lambda_component0 = NULL, N0 = NULL, ...)
Arguments
object |
|
size |
Number of observations. |
lambda_component0 |
Starting values of lambda component. numeric or matrix. |
N0 |
Starting values of N with default value 0. |
... |
Further arguments passed to or from other methods. |
Value
hreal
S3-object, summary of the Hawkes process realization.
Examples
# example 1
mu <- 1; alpha <- 1; beta <- 2
h <- new("hspec", mu=mu, alpha=alpha, beta=beta)
hsim(h, size=100)
# example 2
mu <- matrix(c(0.1, 0.1), nrow=2)
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)
print(res)
[Package emhawkes version 0.9.7 Index]