# residual_process: Compute residual process In emhawkes: Exponential Multivariate Hawkes Model

## Description

Using random time change, this function compute the residual process, which is the inter-arrival time of a standard Poisson process. Therefore, the return values should follow the exponential distribution with rate 1, if model and rambda are correctly specified.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```residual_process( component, type, inter_arrival, rambda_component, mu, beta, dimens = NULL, mark = NULL, N = NULL, Nc = NULL, lambda0 = NULL, N0 = NULL ) ```

## Arguments

 `component` the component of type to get the residual process `type` a vector of types. Distinguished by numbers, 1, 2, 3, and so on. Start with zero. `inter_arrival` inter-arrival times of events. Includes inter-arrival for events that occur in all dimensions. Start with zero. `rambda_component` right continuous version of lambda process `mu` numeric value or matrix or function, if numeric, automatically converted to matrix `beta` numeric value or matrix or function, if numeric, automatically converted to matrix, exponential decay `dimens` dimension of the model. if omitted, set to be the length of `mu`. `mark` a vector of realized mark (jump) sizes. Start with zero. `N` a matrix of counting processes `Nc` a matrix of cumulated counting processes `lambda0` the initial values of lambda component. Must have the same dimensional matrix with `hspec`. `N0` the initial value of N

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10``` ```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=1000) rp <- residual_process(1, res\$type, res\$inter_arrival, res\$rambda_component, mu, beta) p <- ppoints(100) q <- quantile(rp,p=p) plot(qexp(p), q, xlab="Theoretical Quantiles",ylab="Sample Quantiles") qqline(q, distribution=qexp,col="blue", lty=2) ```

emhawkes documentation built on Feb. 16, 2021, 9:06 a.m.