Make Predictions From a Recursively Partitioned Point Process Model

Given a model which has been fitted to point pattern data by recursive partitioning, compute the predicted intensity of the model.

models, spatial
# S3 method for rppm
predict(object, …)

# S3 method for rppm fitted(object, …)


Fitted point process model of class "rppm" produced by the function rppm.

Optional arguments passed to predict.ppm to specify the locations where prediction is required. (Ignored by fitted.rppm)


These functions are methods for the generic functions fitted and predict. They compute the fitted intensity of a point process model. The argument object should be a fitted point process model of class "rppm" produced by the function rppm.

The fitted method computes the fitted intensity at the original data points, yielding a numeric vector with one entry for each data point.

The predict method computes the fitted intensity at any locations. By default, predictions are calculated at a regular grid of spatial locations, and the result is a pixel image giving the predicted intensity values at these locations.

Alternatively, predictions can be performed at other locations, or a finer grid of locations, or only at certain specified locations, using additional arguments which will be interpreted by predict.ppm. Common arguments are ngrid to increase the grid resolution, window to specify the prediction region, and locations to specify the exact locations of predictions. See predict.ppm for details of these arguments.

Predictions are computed by evaluating the explanatory covariates at each desired location, and applying the recursive partitioning rule to each set of covariate values.


The result of fitted.rppm is a numeric vector.

The result of predict.rppm is a pixel image, a list of pixel images, or a numeric vector.

See Also

rppm, plot.rppm

  • fitted.rppm
  • predict.rppm
    fit <- rppm(unmark(gorillas) ~ vegetation, data=gorillas.extra)
    lambdaX <- fitted(fit)
    # Mondriaan pictures
    plot(predict(rppm(redwoodfull ~ x + y)))
# }
Documentation reproduced from package spatstat, version 1.56-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.