qdir_envelope {GET} | R Documentation |
Global scaled maximum absolute difference (MAD) envelope tests
Description
Performs the global scaled MAD envelope tests, either directional quantile or studentised,
or the unscaled MAD envelope test. These tests correspond to calling the
function global_envelope_test
with type="qdir"
, type = "st"
and
type="unscaled"
, respectively. The functions qdir_envelope
, st_envelope
and
unscaled_envelope
have been kept for historical reasons;
preferably use global_envelope_test
with the suitable type
argument.
Usage
qdir_envelope(curve_set, ...)
st_envelope(curve_set, ...)
unscaled_envelope(curve_set, ...)
Arguments
curve_set |
A |
... |
Additional parameters to be passed to |
Details
The directional quantile envelope test (Myllymäki et al., 2015, 2017) takes into account the unequal variances of the test function T(r) for different distances r and is also protected against asymmetry of T(r).
The studentised envelope test (Myllymäki et al., 2015, 2017) takes into account the unequal variances of the test function T(r) for different distances r.
The unscaled envelope test (Ripley, 1981) corresponds to the classical maximum
deviation test without scaling, and leads to envelopes with constant width over the distances r.
Thus, it suffers from unequal variance of T(r) over the distances r and from the asymmetry of
distribution of T(r). We recommend to use the other global envelope tests available,
see global_envelope_test
for full list of alternatives.
Value
An object of class global_envelope
of combined_global_envelope
which can be printed and plotted directly. See global_envelope_test
for more details.
References
Myllymäki, M., Grabarnik, P., Seijo, H. and Stoyan. D. (2015). Deviation test construction and power comparison for marked spatial point patterns. Spatial Statistics 11: 19-34. doi: 10.1016/j.spasta.2014.11.004
Myllymäki, M., Mrkvička, T., Grabarnik, P., Seijo, H. and Hahn, U. (2017). Global envelope tests for spatial point patterns. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 79: 381–404. doi: 10.1111/rssb.12172
Ripley, B.D. (1981). Spatial statistics. Wiley, New Jersey.
See Also
Examples
# See more examples in ?global_envelope_test
## Testing complete spatial randomness (CSR)
#-------------------------------------------
if(require("spatstat.explore", quietly=TRUE)) {
X <- spruces
nsim <- 999 # Number of simulations
## Test for complete spatial randomness (CSR)
# Generate nsim simulations under CSR, calculate centred L-function for the data and simulations
env <- envelope(X, fun="Lest", nsim=nsim, savefuns=TRUE,
correction="translate", transform=expression(.-r),
simulate=expression(runifpoint(ex=X)))
res_qdir <- qdir_envelope(env) # The directional quantile envelope test
plot(res_qdir)
## Advanced use:
# Create a curve set, choosing the interval of distances [r_min, r_max]
curve_set <- crop_curves(env, r_min=1, r_max=8)
# The directional quantile envelope test
res_qdir <- qdir_envelope(curve_set); plot(res_qdir)
# The studentised envelope test
res_st <- st_envelope(curve_set); plot(res_st)
# The unscaled envelope test
res_unscaled <- unscaled_envelope(curve_set); plot(res_unscaled)
}