MultiHard | R Documentation |
Creates an instance of the multitype hard core point process model which can then be fitted to point pattern data.
MultiHard(hradii, types=NULL)
hradii |
Matrix of hard core radii |
types |
Optional; vector of all possible types (i.e. the possible levels
of the |
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()
.
An object of class "interact"
describing the interpoint interaction
structure of the multitype hard core process with
hard core radii hradii[i,j]
.
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))
.
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.
.
ppm
,
pairwise.family
,
ppm.object
,
MultiStrauss
,
MultiStraussHard
,
Strauss
.
See ragsMultiHard
and rmh
for
simulation.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.