Learn R Programming

spatstat.model (version 3.3-1)

as.ppm: Extract Fitted Point Process Model

Description

Extracts the fitted point process model from some kind of fitted model.

Usage

as.ppm(object)

# S3 method for ppm as.ppm(object)

# S3 method for profilepl as.ppm(object)

# S3 method for kppm as.ppm(object)

# S3 method for dppm as.ppm(object)

# S3 method for rppm as.ppm(object)

Value

An object of class "ppm".

Arguments

object

An object that includes a fitted Poisson or Gibbs point process model. An object of class "ppm", "profilepl", "kppm", "dppm" or "rppm", or possibly other classes.

Author

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

Details

The function as.ppm extracts the fitted point process model (of class "ppm") from a suitable object.

The function as.ppm is generic, with methods for the classes "ppm", "profilepl", "kppm", "dppm" and "rppm", and possibly for other classes.

For the class "profilepl" of models fitted by maximum profile pseudolikelihood, the method as.ppm.profilepl extracts the fitted point process model (with the optimal values of the irregular parameters).

For the class "kppm" of models fitted by minimum contrast (or Palm or composite likelihood) using Waagepetersen's two-step estimation procedure (see kppm), the method as.ppm.kppm extracts the Poisson point process model that is fitted in the first stage of the procedure.

The behaviour for the class "dppm" is analogous to the "kppm" case above.

For the class "rppm" of models fitted by recursive partitioning (regression trees), the method as.ppm.rppm extracts the corresponding loglinear model that is fitted in the first stage of the procedure (whose purpose is merely to identify and evaluate the explanatory variables).

See Also

ppm, profilepl.

Examples

Run this code
   # fit a model by profile maximum pseudolikelihood
   rvals <- data.frame(r=(1:10)/100)
   pfit <- profilepl(rvals, Strauss, cells, ~1)
   # extract the fitted model
   fit <- as.ppm(pfit)

Run the code above in your browser using DataLab