model.matrix.mppm: Extract Design Matrix of Point Process Model for Several...

View source: R/mppm.R

model.matrix.mppmR Documentation

Extract Design Matrix of Point Process Model for Several Point Patterns

Description

Given a point process model fitted to a list of point patterns, this function extracts the design matrix.

Usage

   ## S3 method for class 'mppm'
model.matrix(object, ..., keepNA=TRUE, separate=FALSE)

Arguments

object

A point process model fitted to several point patterns. An object of class "mppm".

...

Other arguments (such as na.action) passed to model.matrix.lm.

keepNA

Logical. Determines whether rows containing NA values will be deleted or retained.

separate

Logical value indicating whether to split the model matrix into sub-matrices corresponding to each of the original point patterns.

Details

This command is a method for the generic function model.matrix. It extracts the design matrix of a point process model fitted to several point patterns.

The argument object must be a fitted point process model (object of class "mppm") produced by the fitting algorithm mppm). This represents a point process model that has been fitted to a list of several point pattern datasets. See mppm for information.

The result is a matrix with one column for every constructed covariate in the model, and one row for every quadrature point.

If separate=TRUE this matrix will be split into sub-matrices corresponding to the original point patterns, and the result will be a list containing these matrices.

Value

A matrix (or list of matrices). Columns of the matrix are canonical covariates in the model.

Author(s)

\spatstatAuthors

.

See Also

model.matrix, mppm.

Examples

   fit <- mppm(Points ~ Image + x, demohyper)
   head(model.matrix(fit))
   # matrix with three columns: '(Intercept)', 'x' and 'Image'

spatstat.core documentation built on May 18, 2022, 9:05 a.m.