R: Lurking Variable Plot for Multiple Point Patterns

lurking.mppm {spatstat} | R Documentation

## Lurking Variable Plot for Multiple Point Patterns

### Description

Generate a lurking variable plot of spatial point process residuals against a covariate, for a model fitted to several point patterns.

### Usage

    ## S3 method for class 'mppm'
    lurking(object, covariate, type="eem",
                           ...,
                           separate = FALSE,
                           plot.it = TRUE,
                           covname, oldstyle = FALSE, nx = 512, main="")

### Arguments

`object` | The fitted model. An object of class `"mppm"` representing a point process model fitted to several point patterns.
`covariate` | The covariate to be used on the horizontal axis. Either an `expression` which can be evaluated in the original data, or a list of pixel images, one image for each point pattern in the original data.
`type` | String indicating the type of residuals or weights to be computed. Choices include `"eem"`, `"raw"`, `"inverse"` and `"pearson"`. See `diagnose.ppm` for all possible choices.
`...` | Additional arguments passed to `lurking.ppm`, including arguments controlling the plot.
`separate` | Logical value indicating whether to compute a separate lurking variable plot for each of the original point patterns. If `FALSE` (the default), a single lurking-variable plot is produced by combining residuals from all patterns.
`plot.it` | Logical value indicating whether plots should be shown. If `plot.it=FALSE`, only the computed coordinates for the plots are returned. See Value.
`covname` | A string name for the covariate, to be used in axis labels of plots.
`oldstyle` | Logical flag indicating whether error bounds should be plotted using the approximation given in the original paper (`oldstyle=TRUE`), or using the correct asymptotic formula (`oldstyle=FALSE`).
`nx` | Integer. Number of covariate values to be used in the plot.
`main` | Character string giving a main title for the plot.

### Details

This function generates a ‘lurking variable’ plot for a point process model fitted to several point patterns. Residuals from the model represented by `object` are plotted against the covariate specified by `covariate`. This plot can be used to reveal departures from the fitted model.

The function `lurking` is generic. This is the method for the class `mppm`. The argument `object` must be a fitted point process model object of class `"mppm"`) produced by the model-fitting algorithm `mppm`.

### Value

If `separate=FALSE` (the default), the return value is an object belonging to the class `"lurk"`, for which there are methods for `plot` and `print`. See `lurking` for details of the format.

If `separate=TRUE`, the result is a list of such objects, and also belongs to the class `anylist` so that it can be printed and plotted.

### Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, with thanks to Nicholas Read.

### See Also

`lurking.ppm`

### Examples

      fit <- mppm(Points ~ Image + Group, demohyper)
      lurking(fit, expression(Image), type="P")
      lurking(fit, expression(Image), type="P", separate=TRUE)

[Package spatstat version 1.63-3 Index]