Super-thinned residuals (Clements et. al. (2012)) is a type of transformation based residuals for space-time point processes based on both thinned residuals (see Schoenberg (2003)) and superposed residuals (see Bremaud (1981)). The residuals consist of a set of points that should be homogeneous Poisson, with rate k
, if the model for the conditional intensity is correct. Any patterns or inter-point interaction in the residuals indicates a lack of fit of the model. To test for homogeneity, a commonly used tool is Ripley's K-function, a version of which can be found in the spatstat
package. Super-thinned residuals are found as follows:
1. The super-thinning rate k
is specified. This rate determines the amount of thinning and superposition conducted, and also determines the final rate of the super-thinned residual point process.
2. All observed points in X
where $lambda_hat <$ k are automatically kept.$>
3. All points in X
where $lambda_hat >=$ k
are kept with probability k
$/lambda_hat$.
4. In all space-time locations where $\lambda <$ k, points are simulated with rate k
$- lambda_hat$.$>
The result should be a homogeneous Poisson process with rate k
if the model is correct.
The conditional intensity function, cifunction
, should take X
as the first argument, and an optional theta
as the second argument, and return a vector of conditional intensity estimates with length equal to the number of points in X
, i.e. the length of X$x
. cifunction
is required, while lambda
is optional. lambda
eliminates the need for superthin
to calculate the conditional intensity at each observed point in X
.
If k
is not specified, the default is the mean of $lambda_hat$ estimated by the total number of points divided by the volume of the space-time window.