Lurking Variable Plot for Multiple Point Patterns

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

models, hplot, spatial
# S3 method for mppm
lurking(object, covariate, type="eem",
                       separate = FALSE, 
              = TRUE,
                       covname, oldstyle = FALSE, nx = 512, main="")

The fitted model. An object of class "mppm" representing a point process model fitted to several point patterns.


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.


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.


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.

Logical value indicating whether plots should be shown. If, only the computed coordinates for the plots are returned. See Value.


A string name for the covariate, to be used in axis labels of plots.


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).


Integer. Number of covariate values to be used in the plot.


Character string giving a main title for the plot.


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.


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.

See Also


  • lurking.mppm
  fit <- mppm(Points ~ Image + Group, demohyper)
  lurking(fit, expression(Image), type="P")
  lurking(fit, expression(Image), type="P", separate=TRUE)
# }
Documentation reproduced from package spatstat, version 1.59-0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.