# residual_process: Compute residual process In ksublee/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``` ```residual_process(component, type, inter_arrival, rambda_component, mu, beta, dimens = NULL) ```

## Arguments

 `component` the component of type to get the residual process `type` a vector of dimensions. 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`.

## 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) ```

ksublee/emhawkes documentation built on April 18, 2019, 9:46 a.m.