R: Predict Point Process Model on Linear Network

predict.lppm {spatstat} | R Documentation

## Predict Point Process Model on Linear Network

### Description

Given a fitted point process model on a linear network, compute the fitted intensity or conditional intensity of the model.

### Usage

    ## S3 method for class 'lppm'
    predict(object, ...,
                           type = "trend", locations = NULL, new.coef=NULL)

### Arguments

`object` | The fitted model. An object of class `"lppm"`, see `lppm`.
`type` | Type of values to be computed. Either `"trend"`, `"cif"` or `"se"`.
`locations` | Optional. Locations at which predictions should be computed. Either a data frame with two columns of coordinates, or a binary image mask.
`new.coef` | Optional. Numeric vector of model coefficients, to be used instead of the fitted coefficients `coef(object)` when calculating the prediction.
`...` | Optional arguments passed to `as.mask` to determine the pixel resolution (if `locations` is missing).

### Details

This function computes the fitted poin process intensity, fitted conditional intensity, or standard error of the fitted intensity, for a point process model on a linear network. It is a method for the generic `predict` for the class `"lppm"`.

The argument `object` should be an object of class `"lppm"` (produced by `lppm`) representing a point process model on a linear network.

Predicted values are computed at the locations given by the argument `locations`. If this argument is missing, then predicted values are computed at a fine grid of points on the linear network.

- If `locations` is missing or `NULL` (the default), the return value is a pixel image (object of class `"linim"` which inherits class `"im"`) corresponding to a discretisation of the linear network, with numeric pixel values giving the predicted values at each location on the linear network.

- If `locations` is a data frame, the result is a numeric vector of predicted values at the locations specified by the data frame.

- If `locations` is a binary mask, the result is a pixel image with predicted values computed at the pixels of the mask.

### Value

A pixel image (object of class `"linim"` which inherits class `"im"`) or a numeric vector, depending on the argument `locations`. See Details.

### Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

### References

Ang, Q.W. (2010) Statistical methodology for events on a network. Master's thesis, School of Mathematics and Statistics, University of Western Australia.

Ang, Q.W., Baddeley, A. and Nair, G. (2012) Geometrically corrected second-order analysis of events on a linear network, with applications to ecology and criminology. Scandinavian Journal of Statistics 39, 591–617.

McSwiggan, G., Nair, M.G. and Baddeley, A. (2012) Fitting Poisson point process models to events on a linear network. Manuscript in preparation.

### See Also

`lpp`, `linim`

### Examples

      X <- runiflpp(12, simplenet)
      fit <- lppm(X ~ x)
      v <- predict(fit, type="trend")
      plot(v)

[Package spatstat version 1.54-0 Index]