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?