| residuals {PtProcess} | R Documentation |
Provides methods for the generic function residuals.
## S3 method for class 'mpp': residuals(object, ...) ## S3 method for class 'linksrm': residuals(object, ...)
object |
an object with class mpp or linksrm. |
... |
other arguments. |
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.
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.
TT <- c(0, 1000)
bvalue <- 1
params <- c(-2.5, 0.01, 0.8, bvalue*log(10))
x <- mpp(data=NULL,
gif=srm_gif,
mark=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")