Learn R Programming

spatstat.model (version 3.6-1)

rppm: Recursively Partitioned Point Process Model

Description

Fits a recursive partition model to point pattern data.

Usage

rppm(..., rpargs=list())

Value

An object of class "rppm". There are methods for print, plot, fitted, predict and

prune for this class.

Arguments

...

Arguments passed to ppm specifying the point pattern data and the explanatory covariates.

rpargs

Optional list of arguments passed to rpart controlling the recursive partitioning procedure.

Author

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner rolfturner@posteo.net and Ege Rubak rubak@math.aau.dk.

Details

This function attempts to find a simple rule for predicting the intensity of a point process using explanatory covariates.

The arguments ... specify the point pattern data and explanatory covariates in the same way as they would be in the function ppm.

The recursive partitioning algorithm rpart is then used to find a partitioning rule.

In the resulting model, a recursively partitioned point process model, the intensity function of the point process can be evaluated at any spatial location by following a decision tree. Each fork in the tree is defined by a split on the value of one of the spatial covariates at the query location. For example, for a numerical covariate \(Z\), the left branch of the fork is followed if \(Z < c\) and the right fork is followed if \(Z \ge c\), where \(c\) is the critical value of the split. For a categorical covariate, the left branch of the fork is followed if the value of \(Z\) is one of a specified set of levels of \(Z\), and the right branch is followed otherwise. The tree is followed until reaching a leaf (terminal node) and this determines the value of the intensity.

The decision tree can be visualised as a tree by plot.rppm. The split rules are printed in text form by print.rppm. The predicted intensity at all spatial locations is computed by predict.rppm. The division of space into subsets with different predicted intensities is computed by as.tess.rppm.

References

Breiman, L., Friedman, J. H., Olshen, R. A., and Stone, C. J. (1984) Classification and Regression Trees. Wadsworth.

See Also

plot.rppm, predict.rppm, update.rppm, prune.rppm, as.tess.rppm.

Examples

Run this code
    # New Zealand trees data: trees planted along border
    # Use covariates 'x', 'y'
    nzfit <- rppm(nztrees ~ x + y)
    nzfit
    nzfit2 <- prune(nzfit, cp=0.035)
    nzfit2
    plot(nzfit2)
    # Murchison gold data: numeric and logical covariates
    mur <- solapply(murchison, rescale, s=1000, unitname="km")
    mur$dfault <- distfun(mur$faults)
    # 
    mfit <- rppm(gold ~ dfault + greenstone, data=mur)
    mfit
    # Gorillas data: factor covariates
    #          (symbol '.' indicates 'all variables')
    gfit <- rppm(unmark(gorillas) ~ . , data=gorillas.extra)
    gfit

Run the code above in your browser using DataLab