Skip to contents

\(\log \lambda(u) = \theta^\top z(u)\) with z the monomials in the coordinates up to degree (degree = 0 is the homogeneous process). The likelihood is approximated by the Berman-Turner quadrature (data points plus the nx by ny grid of tile centres, each weighted by its tile's area shared among the quadrature points in that tile) and maximised by Newton's method; this is spatstat.model::ppm on the same quadrature scheme. With simulate > 0, patterns are drawn by Lewis-Shedler thinning of a homogeneous process at the largest fitted intensity over the corners and quadrature points (Philox streams, identical to the Python arm).

Usage

PoissonProcessFit(
  points,
  window,
  degree = 1L,
  nx = 12L,
  ny = 12L,
  simulate = 0L,
  seed = 0,
  max_iter = 100L
)

Arguments

points

Event locations (n x 2) inside window.

window

Rectangle c(xmin, xmax, ymin, ymax).

degree

Polynomial degree of the log intensity.

nx, ny

Dummy grid dimensions.

simulate

Number of patterns to simulate from the fit.

seed

Philox key.

max_iter

Newton iterations.

Value

List with theta, se, loglik, expected_count, simulated.

References

Berman, M. and Turner, T. R. (1992). Approximating point process likelihoods with GLIM. Applied Statistics 41, 31-38.

Lewis, P. A. W. and Shedler, G. S. (1979). Simulation of nonhomogeneous Poisson processes by thinning. Naval Research Logistics Quarterly 26, 403-413.

Examples

PoissonProcessFit(rbind(c(0.1, 0.2), c(0.5, 0.5), c(0.9, 0.7)), c(0, 1, 0, 2), degree = 0)$theta
#> [1] 0.4054651