My object model
is an mppm
object obtained by fitting a model on several independent datasets using the mppm
function from the R
package spatstat
.
Since the envelope
function does not accept inputs of type mppm
, I used the following code (see question Plot an envelope for an mppm object in spatstat) to study its envelope:
gamma= 1 - 0.95^(1/3)
nsims=round(1/gamma-1)
sims <- simulate(model, nsim=2*nsims)
SIMS <- list()
for(i in 1:nrow(sims)) SIMS[[i]] <- as.solist(sims[i,,drop=TRUE])
Hplus <- cbind(data, hyperframe(Sims=SIMS))
EE <- with(Hplus, envelope(Points, Kcross.inhom,funargs=list("A","A"), nsim=nsims, simulate=Sims,savefuns=TRUE,nrank = 1))
plot(pool(EE), main="A to A interactions")
However, it appears that the value of the parameter nrank
has no effect on the final result (same goes, for instance, for the value of nSD
). But setting VARIANCE
to True does modify the result. How can I choose the rank of the envelope when working with an mppm
object ?