spatstat (version 1.54-0)

MultiHard: The Multitype Hard Core Point Process Model

Description

Creates an instance of the multitype hard core point process model which can then be fitted to point pattern data.

Usage

MultiHard(hradii, types=NULL)

Arguments

hradii

Matrix of hard core radii

types

Optional; vector of all possible types (i.e. the possible levels of the marks variable in the data)

Value

An object of class "interact" describing the interpoint interaction structure of the multitype hard core process with hard core radii \(hradii[i,j]\).

Warnings

In order that ppm can fit the multitype hard core model correctly to a point pattern X, this pattern must be marked, with markformat equal to vector and the mark vector marks(X) must be a factor. If the argument types is specified it is interpreted as a set of factor levels and this set must equal levels(marks(X)).

Changed Syntax

Before spatstat version 1.37-0, the syntax of this function was different: MultiHard(types=NULL, hradii). The new code attempts to handle the old syntax as well.

Details

This is a multitype version of the hard core process. A pair of points of types \(i\) and \(j\) must not lie closer than \(h_{ij}\) units apart.

The argument types need not be specified in normal use. It will be determined automatically from the point pattern data set to which the MultiStrauss interaction is applied, when the user calls ppm. However, the user should be confident that the ordering of types in the dataset corresponds to the ordering of rows and columns in the matrix hradii.

The matrix hradii must be symmetric, with entries which are either positive numbers or NA. A value of NA indicates that no distance constraint should be applied for this combination of types.

Note that only the hardcore radii are specified in MultiHard. The canonical parameters \(\log(\beta_j)\) are estimated by ppm(), not fixed in MultiHard().

See Also

ppm, pairwise.family, ppm.object, MultiStrauss, MultiStraussHard, Strauss.

See ragsMultiHard and rmh for simulation.

Examples

Run this code
# NOT RUN {
   h <- matrix(c(1,2,2,1), nrow=2,ncol=2)

   # prints a sensible description of itself
   MultiHard(h)

   # Fit the stationary multitype hardcore process to `amacrine'
   # with hard core operating only between cells of the same type.
   h <- 0.02 * matrix(c(1, NA, NA, 1), nrow=2,ncol=2)
   ppm(amacrine ~1, MultiHard(h))
# }

Run the code above in your browser using DataCamp Workspace