X <- amacrine
J <- (marks(X) == "off")
if(require(spatstat.model)) {
mod <- ppm(X ~ marks * x)
lam <- fitted(mod, dataonly=TRUE)
lmin <- min(predict(mod)[["off"]]) * 0.9
} else {
lam <- intensity(X)[as.integer(marks(X))]
lmin <- intensity(X)[2] * 0.9
}
plot(FmultiInhom(X, J, lambda=lam, lambdamin=lmin))
Run the code above in your browser using DataLab