Last chance! 50% off unlimited learning
Sale ends in
Pairwise(pot, name, par, parnames, printfun)
"interact"
describing the interpoint interaction
structure of a point process.pairwise.family
with arbitrary pairwise interaction potential given by
the user. The function pot
must take as its first argument
a matrix of interpoint distances, and evaluate the
potential for each of these distances. The result must be
either a matrix with the same dimensions as its input,
or an array with its first two dimensions the same as its input
(the latter case corresponds to a vector-valued potential).
If irregular parameters are present, then the second argument
to pot
should be a vector of the same type as par
giving those parameter values.
ppm
,
pairwise.family
,
ppm.object
#This is the same as StraussHard(r=0.7,h=0.05)
strpot <- function(d,par) {
r <- par$r
h <- par$h
value <- (d <= r)
value[d < h] <- -Inf
value
}
mySH <- Pairwise(strpot, "StraussHard", list(r=0.7,h=0.05),
c("interaction distance r", "hard core distance c"))
data(cells)
ppm(cells, ~ 1, mySH, correction="isotropic")
Run the code above in your browser using DataLab