pcfmulti: Marked pair correlation function

View source: R/pcfmulti.R

pcfmultiR Documentation

Marked pair correlation function

Description

For a marked point pattern, estimate the multitype pair correlation function using kernel methods.

Usage

   pcfmulti(X, I, J, ..., r = NULL, rmax=NULL,
            adaptive=FALSE,
            kernel = "epanechnikov", bw = NULL, h=NULL,
            bw.args=list(), stoyan = 0.15, adjust=1,
            correction = c("translate", "Ripley"),
            divisor=c("a", "r", "d", "t"),
            zerocor=c("convolution", "reflection", "bdrykern",
                      "JonesFoster", "weighted", "none",
                      "good", "best"),
            nsmall = 300,
            gref=NULL,
            tau = 0,
            Iname = "points satisfying condition I",
            Jname = "points satisfying condition J",
            IJexclusive=FALSE,
            ratio = FALSE,
            close=NULL)

Arguments

X

The observed point pattern, from which an estimate of the multitype pair correlation function g_{IJ}(r) will be computed. It must be a multitype point pattern (a marked point pattern whose marks are a factor).

I

Subset index specifying the points of X from which distances are measured.

J

Subset index specifying the points in X to which distances are measured.

...

Ignored.

r

Vector of values for the argument r at which g(r) should be evaluated. There is a sensible default.

rmax

Optional. Maximum desired value of the argument r. A single numeric value. There is a sensible default.

adaptive

Logical value specifying whether to use adaptive kernel smoothing (adaptive=TRUE) or fixed-bandwidth kernel smoothing (adaptive=FALSE, the default).

kernel

Choice of smoothing kernel, passed to density.default.

bw

Bandwidth for smoothing kernel. Either a single numeric value giving the standard deviation of the kernel, or a character string specifying a bandwidth selection rule, or a function that computes the selected bandwidth. See Details.

h

Kernel halfwidth h (incompatible with argument bw). A numerical value. The parameter h is defined as the half-width of the support of the kernel, except for the Gaussian kernel where h is the standard deviation.

bw.args

Optional. List of additional arguments to be passed to bw when bw is a function. Alternatively, bw may be a function that should be applied to X to produce a list of additional arguments.

stoyan

Coefficient for default bandwidth rule.

adjust

Numerical adjustment factor for the bandwidth. The bandwidth actually used is adjust * bw. This makes it easy to specify choices like ‘half the selected bandwidth’.

correction

String (partially matched) specifying the choice or choices of spatial edge correction. Options include "translate" for the translation correction, "isotropic" or "Ripley" for Ripley's isotropic correction, and "none" for no edge correction.

divisor

String specifying the choice of estimator. See pcf.ppp.

zerocor

String (partially matched) specifying a correction for the boundary effect bias at r=0. Possible values are "none", "weighted", "convolution", "reflection", "bdrykern" and "JonesFoster". See pcf.ppp.

nsmall

Optional. Integer. The maximum number of data points for which the default value of zerocor will be "JonesFoster".

gref

Optional. A pair correlation function that will be used as the reference for the transformation to uniformity, when divisor="t". Either a function in the R language giving the pair correlation function, or a fitted model (object of class "kppm", "dppm", "ppm" or "slrm") or a theoretical point process model (object of class "zclustermodel" or "detpointprocfamily") for which the pair correlation function can be computed.

tau

Optional shrinkage coefficient. A single numeric value.

Iname, Jname

Optional. Character strings describing the members of the subsets I and J.

IJexclusive

Logical value indicating whether the subsets I and J are guaranteed to be mutually exclusive.

ratio

Logical. If TRUE, the numerator and denominator of each edge-corrected estimate will also be saved, for use in analysing replicated point patterns.

close

Advanced use only. Precomputed data obtained from crosspairs.

Details

This is a generalisation of pcfcross to arbitrary collections of points.

The algorithm measures the distance from each data point in subset I to each data point in subset J, excluding identical pairs of points. The distances are kernel-smoothed and renormalised to form a pair correlation function.

The smoothing algorithm is a multitype version of the smoothing algorithm in pcf.ppp.

See pcf.ppp for detailed documentation of the arguments correction, divisor, zerocor, and other smoothing arguments.

Value

An object of class "fv".

Author(s)

\spatstatAuthorsComma

, \tilman and \martinH.

See Also

pcfcross, pcfdot, pcf.ppp.

Examples

  adult <- (marks(longleaf) >= 30)
  juvenile <- !adult
  p <- pcfmulti(longleaf, adult, juvenile)

spatstat.explore documentation built on March 22, 2026, 5:06 p.m.