I wish to create an envelope for mark correlation functions (in my example, mark variogram, but this should apply to any of them) pooling field replicates from what's assumed to be the same point process. While having read the documentation available for each of those steps in isolation, I couldn't find much about the application of pooling and envelopes to mark correlation functions.
In the following I'll illustrate my attempt by recreating in an example, at the best of my abilities, with longleaf and a jittered copy of it (despite being meaningless, it should suffice).
longleaf2 <- rjitter(longleaf, radius=10, retry = T)
list <- solist(longleaf, longleaf2)
vario <- lapply(list, function(x) envelope(x, markvario, nsim = 39,
simulate=expression(rlabel(x)), savefuns=T))
pool <- pool(as.anylist(vario))
plot(pool)
While the output seems reasonable, I have no assurance about this procedure being sound. Additionally, while the envelope shading is plotted with this example, it's not with my data, and forcing it with plot.envelope returns an error.
Alternatively, the answer to this question seems to suggest pooling first, then making envelopes, but there's no fv method for envelope as far as I know.
There are several questions here.
Firstly about the validity of pooling:
Pooling several
envelopeobjects involves extracting all the simulated functions from all the envelopes, and constructing a newenvelopeobject based on these simulated functions. If that is valid in your context, then the procedure is valid.Validity depends on how the simulated functions were generated. In your case, if there are several different point pattern datasets, and you generate an envelope for each data point pattern using
rlabelto randomise the marks, then I think it is not valid to pool these envelopes, because the summary functions in one envelope are not exchangeable with the summary functions from another envelope.Next about the computational procedure:
So... the example given in the question is working as desired,... but with your data it doesn't work? Please provide a minimal working example where the procedure does not work.
In your example,
variois a list, each element of which is anenvelopeobject. Then thepoolcommand is dispatched topool.anylistwhich invokespool.envelope. Then the result is anenvelopeobject.In your actual data (which you didn't show us) the first thing would be to check that you have a list of
envelopeobjects, e.g.If this is
FALSEthen the result ofpoolwill not be an envelope object.