locppm: Locally Fitted Poisson or Gibbs Point Process Model

View source: R/locppm.R

locppmR Documentation

Locally Fitted Poisson or Gibbs Point Process Model

Description

Fits Poisson or Gibbs point process model using local likelihood or pseudolikelihood.

Usage

locppm(..., sigma = NULL, f = 1/4,
       vcalc = c("none", "t", "hessian", "hom", "lik", "full"),
       locations=c("split", "fine", "coarse"),
       ngrid = NULL, grideps = NULL, verbose = TRUE,
       use.fft=FALSE, fft.algorithm="closepairs")

Arguments

...

Arguments passed to ppm to fit the homogeneous model.

sigma

Standard deviation of Gaussian kernel for local likelihood.

f

Argument passed to bw.frac to compute a value for sigma if it is missing or NULL.

vcalc

Type of variance calculation to be performed. See Details.

locations

Spatial locations for local calculations. See Details.

ngrid

Dimensions of coarse grid, if used. See Details. Incompatible with grideps.

grideps

Grid spacing of coarse grid, if used. See Details. Incompatible with ngrid.

verbose

Logical. If TRUE, print progress reports.

use.fft

Logical value indicating whether to perform computations using the Fast Fourier Transform. With use.fft = TRUE the code runs much faster but some quantities are not computed exactly. See Details.

fft.algorithm

Developer use only.

Details

This function fits a Poisson or Gibbs point process model to point pattern data by local likelihood or local pseudolikelihood respectively.

This command should be used in the same way as ppm. The point pattern data and the specification of the model are given in the leading arguments ... which are passed directly to ppm.

In all cases, the local estimates of the coefficients are computed. However, because the variance calculations are time-consuming, the default is not to perform them. This is controlled by the argument vcalc.

vcalc = "none":

no variance calculations are performed.

vcalc = "t":

the t statistic for each parameter is computed for the local model.

vcalc = "hessian":

the local Hessian matrix is computed, and its negative inverse is used as a surrogate for the local variance.

vcalc = "hom":

No local fitting is performed. Calculations are performed only for the homogeneous (template) model. The variance of the local parameter estimates under the homogeneous model is computed.

vcalc = "lik":

In addition to the calculations for vcalc="hom" described above, if use.fft=FALSE the algorithm also computes the local composite likelihood ratio test statistic for the test of homogeneity. If use.fft=TRUE then vcalc="lik" is equivalent to vcalc="hom".

vcalc = "full":

all variance calculations are performed for the local model.

The spatial locations, where the model fits and variance calculations are performed, are determined by the argument locations.

locations = "fine":

The calculations are performed at every quadrature point of the model. This can take a very long time.

locations = "coarse":

The calculations are performed at the points of a coarse grid with dimensions specified by ngrid or grideps.

locations = "split":

The fitted coefficients are computed at every quadrature point of the model, but the variance calculations (if any) are performed at a coarse grid of locations, specified by ngrid or grideps. If neither ngrid nor grideps is specified, the default is ngrid=10.

If use.fft=FALSE (the default), all desired quantities are computed exactly, by an iterative algorithm that fits a separate model at each spatial location. This can be quite slow.

If use.fft=TRUE, we only compute quantities that can be obtained using the Fast Fourier Transform, resulting in much faster calculations (sometimes 3 orders of magnitude faster) when locations="fine". Properties of the homogeneous model are computed accurately. Properties of the locally-fitted model are approximated by a first order Taylor expansion.

Value

An object of class "locppm" representing the fitted model.

Author(s)

\adrian

.

References

\localpaper \baddrubaturnbook

See Also

methods.locppm, plot.locppm

Examples

   fit <- locppm(swedishpines, ~1, sigma=9, nd=20)
   fit

baddstats/spatstat.local documentation built on July 18, 2024, 4:36 p.m.