0
$\begingroup$

I have performed an Lcross examination in R with the following code:

intEnv  <- envelope(detractors.ppp, fun = Lcross, i="Park", j="Property", nsim = 999, r = 0:350, simulate = expression(rlabel(detractors.ppp)), correction="border")

plot(intEnv$r, intEnv$obs - intEnv$r, xlab='h', ylab='Lcross (Parks-Property Crime) - h',
     type="l", col='purple', ylim=c(-500,500), xlim=c(0,350),
     main="Lhat(interaction) - h for Parks & Property Crime")
abline(h=0, lty = 3)
lines(intEnv$r, intEnv$theo - intEnv$r, lty=3)
lines(intEnv$r, intEnv$hi - intEnv$r, lty=2, col='red')
lines(intEnv$r, intEnv$lo - intEnv$r, lty=2, col='red')
legend("topleft", inset=0.02, c("Parks-Property Crime", "Independence", "0.05 Envelopes"), lty=c(1,3,3,2), col=c("purple", "black", "red"))

However, the upper and lower confidence envelopes do not bound the horizontal X-axis (see below). This does not seem right to me. Can anyone offer an explanation of what might be happening here, and if I have done something wrong?

img

$\endgroup$
0
$\begingroup$

Your red dashed lines gives the upper and lower bounds for the simulations under the "null model" of random labelling conditional on the point locations. Simulation envelopes under a null model is not the same as a confidence region! The envelope is the area where you expect Lcross-r to be if your null model of random labelling holds. The black line is the theoretical line for independent components. Finally the purple line is the observed summary statistic Lcross-r for your data.

You should be able to get a similar plot by simply using plot.fv from spatstat.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.