residuals.slrm {spatstat.model}R Documentation

Residuals for Fitted Spatial Logistic Regression Model

Description

Given a spatial logistic regression model fitted to a point pattern, compute the residuals for each pixel.

Usage

  ## S3 method for class 'slrm'
residuals(object,
                           type=c("raw", "deviance", "pearson", "working", 
                                  "response", "partial", "score"),
                           ...)

Arguments

object

The fitted point process model (an object of class "ppm") for which residuals should be calculated.

type

String (partially matched) indicating the type of residuals to be calculated.

...

Ignored.

Details

This function computes several kinds of residuals for the fit of a spatial logistic regression model to a spatial point pattern dataset.

The argument object must be a fitted spatial logistic regression model (object of class "slrm"). Such objects are created by the fitting algorithm slrm.

The residuals are computed for each pixel that was used to fit the original model. The residuals are returned as a pixel image (if the residual values are scalar), or a list of pixel images (if the residual values are vectors).

The type of residual is chosen by the argument type.

For a given pixel, suppose p is the fitted probability of presence of a point, and y is the presence indicator (equal to 1 if the pixel contains any data points, and equal to 0 otherwise). Then

Value

A pixel image (if the residual values are scalar), or a list of pixel images (if the residual values are vectors).

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

See Also

residuals.glm, residuals.ppm

Examples

   d <- if(interactive()) 128 else 32
   H <- unmark(humberside)
   fit <- slrm(H ~ x + y, dimyx=d)

   plot(residuals(fit))

   plot(residuals(fit, type="score"))

[Package spatstat.model version 3.2-11 Index]