Skip to contents

This method compute the inferred lambda process and returns it as hreal form. If we have realized path of Hawkes process and its parameter value, then we can compute the inferred lambda processes. Similarly with other method such as hfit, the input arguments are inter_arrival, type, mark, or equivalently, N and Nc.

Usage

infer_lambda(
  object,
  inter_arrival = NULL,
  type = NULL,
  mark = NULL,
  N = NULL,
  Nc = NULL,
  lambda_component0 = NULL,
  N0 = NULL,
  Nc0 = NULL,
  ...
)

# S4 method for class 'hspec'
infer_lambda(
  object,
  inter_arrival = NULL,
  type = NULL,
  mark = NULL,
  N = NULL,
  Nc = NULL,
  lambda_component0 = NULL,
  N0 = NULL,
  Nc0 = NULL,
  ...
)

Arguments

object

hspec-class. This object includes the parameter values.

inter_arrival

inter-arrival times of events. This includes inter-arrival for events that occur in all dimensions. Start with zero.

type

a vector of dimensions. Distinguished by numbers, 1, 2, 3, and so on. Start with zero.

mark

a vector of mark (jump) sizes. Start with zero.

N

Hawkes process. If not provided, then generate using inter_arrival and type.

Nc

mark accumulated Hawkes process. If not provided, then generate using inter_arrival, type and mark.

lambda_component0

Initial values for the lambda component \(\lambda_{ij}\). Can be a numeric value or a matrix. Must have the same number of rows and columns as alpha or beta in object.

N0

the initial values of N.

Nc0

the initial values of Nc.

...

further arguments passed to or from other methods.

Value

hreal S3-object, with inferred intensity.

Examples

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)
summary(res)
#> -------------------------------------------------------
#> Simulation result of exponential (marked) Hawkes model.
#> Realized path :
#>       arrival N1 N2 mark lambda1 lambda2
#>  [1,]   0.000  0  0    0 0.15000 0.15000
#>  [2,]  12.233  0  1    1 0.10000 0.10000
#>  [3,]  12.672  1  1    1 0.16736 0.23471
#>  [4,]  15.191  1  2    1 0.12769 0.12431
#>  [5,]  15.546  1  3    1 0.19276 0.26295
#>  [6,]  17.424  1  4    1 0.13558 0.16700
#>  [7,]  19.752  2  4    1 0.11667 0.13283
#>  [8,]  20.598  2  5    1 0.20125 0.16207
#>  [9,]  21.680  2  6    1 0.17597 0.19893
#> [10,]  24.920  3  6    1 0.10953 0.11619
#> [11,]  27.168  3  7    1 0.12770 0.11536
#> [12,]  30.095  3  8    1 0.10917 0.11547
#> [13,]  31.309  3  9    1 0.13660 0.17224
#> [14,]  33.067  4  9    1 0.12808 0.15596
#> [15,]  33.322  5  9    1 0.28126 0.22395
#> [16,]  33.937  6  9    1 0.31919 0.22875
#> [17,]  47.262  7  9    1 0.10000 0.10000
#> [18,]  47.923  8  9    1 0.21028 0.15514
#> [19,]  48.962  9  9    1 0.22180 0.16090
#> [20,]  57.067  9 10    1 0.10022 0.10011
#> ... with 80 more rows 
#> -------------------------------------------------------
res2 <- infer_lambda(h, res$inter_arrival, res$type)
#> Warning: The 'infer_lambda' function is deprecated. Please use 'logLik' with 'infer = TRUE' instead.
#> The initial values for intensity processes are not provided. Internally determined initial values are used.
summary(res2)
#>                  Length Class  Mode   
#> loglikelihood      1    -none- numeric
#> lambda           200    -none- numeric
#> lambda_component 400    -none- numeric
#> rambda           200    -none- numeric
#> rambda_component 400    -none- numeric
#> res_process1      39    -none- numeric
#> res_process2      58    -none- numeric