residuals {PtProcess} | R Documentation |
Residuals of a Point Process Model
Description
Provides methods for the generic function residuals
.
Usage
## S3 method for class 'mpp'
residuals(object, ...)
## S3 method for class 'linksrm'
residuals(object, ...)
Arguments
object |
|
... |
other arguments. |
Details
Let be the times of the observed events. Then the transformed times are defined as
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 . 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
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")