Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

quad.ppm

Extract Quadrature Scheme Used to Fit a Point Process Model


Description

Given a fitted point process model, this function extracts the quadrature scheme used to fit the model.

Usage

quad.ppm(object, drop=FALSE, clip=FALSE)

Arguments

object

fitted point process model (an object of class "ppm" or "kppm" or "lppm").

drop

Logical value determining whether to delete quadrature points that were not used to fit the model.

clip

Logical value determining whether to erode the window, if object was fitted using the border correction. See Details.

Details

An object of class "ppm" represents a point process model that has been fitted to data. It is typically produced by the model-fitting algorithm ppm.

The maximum pseudolikelihood algorithm in ppm approximates the pseudolikelihood integral by a sum over a finite set of quadrature points, which is constructed by augmenting the original data point pattern by a set of “dummy” points. The fitted model object returned by ppm contains complete information about this quadrature scheme. See ppm or ppm.object for further information.

This function quad.ppm extracts the quadrature scheme. A typical use of this function would be to inspect the quadrature scheme (points and weights) to gauge the accuracy of the approximation to the exact pseudolikelihood.

Some quadrature points may not have been used in fitting the model. This happens if the border correction is used, and in other cases (e.g. when the value of a covariate is NA at these points). The argument drop specifies whether these unused quadrature points shall be deleted (drop=TRUE) or retained (drop=FALSE) in the return value.

The quadrature scheme has a window, which by default is set to equal the window of the original data. However this window may be larger than the actual domain of integration of the pseudolikelihood or composite likelihood that was used to fit the model. If clip=TRUE then the window of the quadrature scheme is set to the actual domain of integration. This option only has an effect when the model was fitted using the border correction; then the window is obtained by eroding the original data window by the border correction distance.

See ppm.object for a list of all operations that can be performed on objects of class "ppm". See quad.object for a list of all operations that can be performed on objects of class "quad".

This function can also be applied to objects of class "kppm" and "lppm".

Value

A quadrature scheme (object of class "quad").

Author(s)

and Rolf Turner r.turner@auckland.ac.nz

See Also

Examples

fit <- ppm(cells ~1, Strauss(r=0.1))
 Q <- quad.ppm(fit)
 # plot(Q)
 npoints(Q$data)
 npoints(Q$dummy)

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.