intensity_pspline: Intensity Estimation on Geometric Networks with Penalized...

View source: R/fitting.R

intensity_psplineR Documentation

Intensity Estimation on Geometric Networks with Penalized Splines

Description

This is the main function of the geonet package. intensity_pspline estimates the intensity of a point pattern on a geometric network employing penalized splines as outlined in Schneble and Kauermann (2020). In distinction to density.lpp from the spatstat.linnet package, which provides kernel based tools for intensity estimation of point patterns on linear networks, intensity_pspline allows to incorporate covariates while also estimating the baseline intensity. Covariates can be either internal or external. External covariates can also be incorporated as a smooth term using penalized splines with the same syntax as in gam.

Usage

intensity_pspline(
  X,
  ...,
  formula = ~1,
  delta = "0",
  h = "0.5",
  r = 2,
  scale = NULL,
  density = FALSE,
  verbose = FALSE,
  control = list()
)

Arguments

X

A point pattern on a geometric network (object of class gnpp). The data (X$data) must contain information on all covariates included in formula.

...

Other arguments. The following arguments must match exactly.

formula

A one-sided formula (if a two-sided formula is supplied, the left hand side of the formula is ignored). The formula can consist of either linear terms as in linear models (lm) or smooth terms as in gam formulae, where the usage is restricted to smooth terms constructed with s and the argument bs is set to bs = "ps" by default, i.e. intensity_pspline can handle penalized spline based smooth terms.

delta

The global knot distance δ, a numerical vector of length one. If not supplied, delta will be chosen properly according to the geometric network X which is supplied.

h

The global bin width h, a numerical vector of length one. If not supplied, h will be chosen properly according to the geometric network X which is supplied.

r

The order of the penalty of the baseline intensity on the geometric network, default to a penalty of order r = 2.

scale

A named list which specifies the rescaling of network related covariates. Currently, only x- and y-coordinates can be scaled.

density

TRUE if the intensity should be normalized such that it can be interpreted as a density, i.e. the integral over the estimated density is equal to one.

verbose

If TRUE, prints information on the process of the fitting algorithm.

control

A list of optional arguments which control the convergence of the fitting algorithm. See "Details".

Value

A fitted geometric network (object of class gnppfit).

Author(s)

Marc Schneble marc.schneble@stat.uni-muenchen.de

References

Schneble, M. and G. Kauermann (2020). Intensity estimation on geometric networks with penalized splines. arXiv preprint arXiv:2002.10270 .

Examples

library(geonet)
X <- runifgn(50, small_gn)
delta <- 0.2
model <- intensity_pspline(X, delta = delta)
summary(model)
plot(model)

geonet documentation built on July 11, 2022, 9:08 a.m.