Learn R Programming

PtProcess (version 3.3-16)

residuals: Residuals of a Point Process Model

Description

Provides methods for the generic function residuals.

Usage

# S3 method for mpp
residuals(object, ...)
# S3 method for linksrm
residuals(object, ...)

Arguments

object

an object with class mpp or linksrm.

...

other arguments.

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.

Details

Let \(t_i\) be the times of the observed events. Then the transformed times are defined as $$ \tau_i = \int_0^{t_i} \lambda_g(t|{\cal H}_t) 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.

References

Cited references are listed on the PtProcess manual page.

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab