| hsim | R Documentation |
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.
hsim(object, size = 100, lambda_component0 = NULL, N0 = NULL, ...) ## S4 method for signature 'hspec' hsim(object, size = 100, lambda_component0 = NULL, N0 = NULL, ...)
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. |
hreal S3-object, summary of the Hawkes process realization.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.