Learn R Programming

spatstat (version 1.64-1)

model.frame.ppm: Extract the Variables in a Point Process Model

Description

Given a fitted point process model, this function returns a data frame containing all the variables needed to fit the model using the Berman-Turner device.

Usage

# S3 method for ppm
model.frame(formula, ...)

# S3 method for kppm model.frame(formula, ...)

# S3 method for dppm model.frame(formula, ...)

# S3 method for lppm model.frame(formula, ...)

Arguments

formula

A fitted point process model. An object of class "ppm" or "kppm" or "dppm" or "lppm".

Additional arguments passed to model.frame.glm.

Value

A data.frame containing all the variables used in the fitted model, plus additional variables specified in . It has an additional attribute "terms" containing information about the model formula. For details see model.frame.glm.

Details

The function model.frame is generic. These functions are method for model.frame for fitted point process models (objects of class "ppm" or "kppm" or "dppm" or "lppm").

The first argument should be a fitted point process model; it has to be named formula for consistency with the generic function.

The result is a data frame containing all the variables used in fitting the model. The data frame has one row for each quadrature point used in fitting the model. The quadrature scheme can be extracted using quad.ppm.

References

Baddeley, A. and Turner, R. (2000) Practical maximum pseudolikelihood for spatial point patterns. Australian and New Zealand Journal of Statistics 42, 283--322.

See Also

ppm, kppm, dppm, lppm, model.frame, model.matrix.ppm

Examples

Run this code
# NOT RUN {
  fit <- ppm(cells ~ x)
  mf <- model.frame(fit)
  kfit <- kppm(redwood ~ x, "Thomas")
  kmf <- model.frame(kfit)
# }

Run the code above in your browser using DataLab