These functions compute pointwise summary statistics
from \(n\) spatial summary functions which were
obtained from \(n\) simulated point patterns.
The object should have been generated by the
function envelope
with the argument savefuns=TRUE
specified.
The function envelope is normally used to
generate simulation envelopes for a particular spatial summary function,
such as the \(K\) function, by simulating \(n\) realisations
of Complete Spatial Randomness or another model.
However, when envelope is called with
the argument savefuns=TRUE, it returns all the individual
summary functions for the \(n\) simulated point patterns.
These individual functions are extracted by ptwise.envelope
which then computes the desired summary statistics.
The argument stats specifies the desired summary statistics.
It can be a character string, or vector of character strings,
containing any of the following (partially matched):
- mean
the pointwise sample mean of the functions
- median
the pointwise sample median of the functions
- bias
the pointwise bias of the functions
- var
the pointwise sample variance of the functions
- sd
the pointwise sample standard deviation of the functions
- se
the standard error of the pointwise sample mean
- mse
the pointwise mean squared error
- rmse
the pointwise root-mean-squared error
- confint
a confidence interval for the true mean
- predint
a prediction interval for the function value
For confint or predint the argument level
specifies the confidence level.
Alternatively, the argument stats can be a user-specified
function in the R language, which computes the summary statistic.
It should accept a vector argument and return a single numerical value.
The result is an object of class "fv" that can be plotted
directly. See the Examples for different styles of plot.
The functions bias.envelope and RMSE.envelope are
wrappers for ptwise.envelope which calculate the bias
and root-mean-square error respectively.