## S3 method for class 'pp3':
envelope(Y, fun=K3est, nsim=99, nrank=1, \dots,
simulate=NULL, verbose=TRUE,
transform=NULL,global=FALSE,ginterval=NULL,
savefuns=FALSE, savepatterns=FALSE,
nsim2=nsim, VARIANCE=FALSE, nSD=2, Yname=NULL)"pp3").nsim simulated
values. A rank of 1 means that the minimum and maximum
simulated values will be used.fun.simulate is an expression in the R language, then this
expression will be evaluated nsim times,
to obtain nsim point patterns which areglobal=FALSE) or simultaneous (global=TRUE).global=TRUE.global=TRUE
and the simulations are not based on CSR.TRUE, critical envelopes will be calculated
as sample mean plus or minus nSD times sample standard
deviation.VARIANCE=TRUE.Y when printing or plotting the results."fv")
which can be plotted directly.
See envelope for further details.envelope command performs simulations and
computes envelopes of a summary statistic based on the simulations.
The result is an object that can be plotted to display the envelopes.
The envelopes can be used to assess the goodness-of-fit of
a point process model to point pattern data.
The envelope function is generic, with methods for
the classes "ppp", "ppm" and "kppm"
described in the help file for envelope.
This function envelope.pp3 is the method for
three-dimensional point patterns (objects of class "pp3").
For the most basic use, if you have a 3D point pattern X and
you want to test Complete Spatial Randomness (CSR), type
plot(envelope(X, K3est,nsim=39)) to see the three-dimensional
$K$ function for X plotted together with the envelopes of
the three-dimensional $K$ function for 39 simulations of CSR.
To create simulation envelopes, the command envelope(Y, ...)
first generates nsim random point patterns
in one of the following ways.
simulate=NULL,
then we generatensimsimulations of
Complete Spatial Randomness (i.e.nsimsimulated point patterns
each being a realisation of the uniform Poisson point process)
with the same intensity as the patternY.simulateis supplied, then it determines how the
simulated point patterns are generated.
Seeenvelopefor details.fun is applied to each of these simulated
patterns. Typically fun is one of the functions
K3est, G3est, or F3est.
It may also be a character string
containing the name of one of these functions.
For further information, see the documentation for
envelope.pp3,
rpoispp3,
K3est,
G3est,
F3est.X <- rpoispp3(20, box3())
plot(envelope(X, nsim=39))
<testonly>plot(envelope(X, nsim=4))</testonly>Run the code above in your browser using DataLab