spatstat (version 1.37-0)

residuals.mppm: Residuals for Point Process Model Fitted to Multiple Point Patterns

Description

Given a point process model fitted to multiple point patterns, compute residuals for each pattern.

Usage

## S3 method for class 'mppm':
residuals(object, type = "raw", ..., 
                             fittedvalues = fitted.mppm(object))

Arguments

object
Fitted point process model (object of class "mppm").
...
Ignored.
type
Type of residuals: either "raw", "pearson" or "inverse". Partially matched.
fittedvalues
Advanced use only. Fitted values of the model to be used in the calculation.

Value

  • A list of signed measures (objects of class "msr") giving the residual measure for each of the original point patterns. See Details.

Details

Baddeley et al (2005) defined residuals for the fit of a point process model to spatial point pattern data. For an explanation of these residuals, see the help file for residuals.ppm.

This function computes the residuals for a point process model fitted to multiple point patterns. The object should be an object of class "mppm" obtained from mppm.

The return value is a list. The number of entries in the list equals the number of point patterns in the original data. Each entry in the list has the same format as the output of residuals.ppm. That is, each entry in the list is a signed measure (object of class "msr") giving the residual measure for the corresponding point pattern.

References

Baddeley, A., Turner, R., Moller, J. and Hazelton, M. (2005) Residual analysis for spatial point processes. Journal of the Royal Statistical Society, Series B 67, 617--666.

See Also

mppm, residuals.mppm, mppm

Examples

Run this code
data(waterstriders)
    fit <- mppm(Bugs ~ x, hyperframe(Bugs=waterstriders))
    r <- residuals(fit)
    # compute total residual for each point pattern
    rtot <- sapply(r, integral.msr)
    # standardise the total residuals
    areas <- sapply(windows.mppm(fit), area.owin)
    rtot/sqrt(areas)

Run the code above in your browser using DataCamp Workspace