data("imdepi")
imdepiB <- subset(imdepi, type == "B")
## Obtain the p-value via a Monte Carlo permutation test,
## where the permutations can be computed in parallel
## (using forking on Unix-alikes and a cluster on Windows, see ?plapply)
knoxtest <- knox(
dt = dist(imdepiB$events$time), eps.t = 30,
ds = dist(coordinates(imdepiB$events)), eps.s = 50,
simulate.p.value = TRUE, B = 199,
.parallel = 2, .seed = 1, .verbose = FALSE
)
knoxtest
plot(knoxtest)
Run the code above in your browser using DataLab