# residuals: Residuals of a Point Process Model In PtProcess: Time Dependent Point Process Modelling

## Description

Provides methods for the generic function `residuals`.

## Usage

 ```1 2 3 4``` ```## S3 method for class 'mpp' residuals(object, ...) ## S3 method for class 'linksrm' residuals(object, ...) ```

## Arguments

 `object` an object with class `mpp` or `linksrm`. `...` other arguments.

## Details

Let ti be the times of the observed events. Then the transformed times are defined as

tau_i = integral_0^{ti} of {lambda_g(t|Ht) dt}.

If the proposed point process model is correct, then the transformed time points will form a stationary Poisson process with rate parameter one. A plot of transformed time points versus the cumulative number of events should then roughly follow the straight line y = x. Significant departures from this line indicate a weakness in the model. Further details can be found in Ogata (1988) and Aalen & Hoem (1978).

See Baddeley et al (2005) and Zhuang (2006) for extensions of these methodologies.

## Value

Returns a time series object with class "`ts`" in the case of `mpp`. In the case of `linksrm` a list is returned with the number of components being equal to the number of regions, and with each component being a time series object.

## References

Cited references are listed on the PtProcess manual page.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21``` ```TT <- c(0, 1000) bvalue <- 1 params <- c(-2.5, 0.01, 0.8, bvalue*log(10)) x <- mpp(data=NULL, gif=srm_gif, marks=list(NULL, rexp_mark), params=params, gmap=expression(params[1:3]), mmap=expression(params[4]), TT=TT) x <- simulate(x, seed=5) tau <- residuals(x) plot(tau, ylab="Transformed Time", xlab="Event Number") abline(a=0, b=1, lty=2, col="red") # represent as a cusum plot(tau - 1:length(tau), ylab="Cusum of Transformed Time", xlab="Event Number") abline(h=0, lty=2, col="red") ```

PtProcess documentation built on Nov. 17, 2017, 7:12 a.m.