I would like to ask your help for finding the reason why when I use the function envelope, my arguments are not accepted, but defined "unused arguments". The data I'm using are ppp without marks and I would like to create a L function graph with simulated data and my data. Here the code for my ppp data:
map2008MLW = ppp(xy2008_BNGppp$x, xy2008_BNGppp$y, window = IoM_polygon_MLWowin)
And then:
L2008 = Lest(map2008MLW,correction="Ripley")
OP = par(mar=c(5,5,4,4))
plot(L2008, . -r ~ r, ylab=expression(hat("L")), xlab = "d (m)"); par(OP)
L2008$iso = L$iso - L$r
L2008$theo = L$theo - L$r
Desired number of simulations
n = 9999
Desired p significance level to display
p = 0.05
And at this point the envelope function doesnt seem very happy:
EL2008 = envelope(map2008MLW[W], Lest, nsim=n, rank=(p * (n + 1)))
Error in envelope(map2008MLW[W], Lest, nsim = n, rank = (p * (n + 1))) :
unused arguments (nsim = n, rank = (p * (n + 1)))
It seems a generic error and I am not sure it is caused by the package spatstat. Please, help me in finding a solution to this, as I can't proceed with my analyses.
Thank you very much,
Martina
xy2008_BNGpppandIoM_polygon_MLWowinwhich we don't have access to. Perhaps you can generate reproducible artificial data which gives the same error? Or upload the data somewhere. You also refer toLandWwhich are undefined objects. Could you have another package loaded which also has a functionenvelope? Try using spatstat::envelope to be sure. For hints on how to make a good example so we can help you look here: stackoverflow.com/a/5963610/3341769 - Ege Rubak