Description Usage Arguments Details Value References See Also Examples

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 `"qdir"`

, `type = "st"`

and
`"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.

1 2 3 4 5 | ```
qdir_envelope(curve_set, ...)
st_envelope(curve_set, ...)
unscaled_envelope(curve_set, ...)
``` |

`curve_set` |
A curve_set (see |

`...` |
Additional parameters to be passed to |

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.

An object of class "global_envelope", "envelope" and "fv" (see `fv.object`

),
which can be printed and plotted directly.

Essentially a data frame containing columns

r = the vector of values of the argument r at which the test was made

obs = values of the test function for the data point pattern

lo = the lower envelope based on the simulated functions

hi = the upper envelope based on the simulated functions

central = If the curve_set (or envelope object) contains a component 'theo', then this function is used as the central curve and returned in this component. Otherwise, the central curve is the mean of the test functions T_i(r), i=2, ..., s+1. Used for visualization only.

Additionally, the return value has attributes

method = The name of the method ("Global envelope test")

alternative = "two-sided

p = A point estimate for the p-value (default is the mid-rank p-value).

u_alpha = The value of u corresponding to the 100(1-alpha)% global envelope.

u = Deviation values (u[1] is the value for the data pattern).

call = The call of the function.

and a punch of attributes for the "fv" object type.

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.

`global_envelope_test`

, `plot.global_envelope`

,
`global_envelope_test_2d`

, `dg.global_envelope_test`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ```
# See more examples in ?global_envelope_test
## Testing complete spatial randomness (CSR)
#-------------------------------------------
if(require("spatstat", quietly=TRUE)) {
pp <- spruces
## Test for complete spatial randomness (CSR)
# Generate nsim simulations under CSR, calculate L-function for the data and simulations
env <- envelope(pp, fun="Lest", nsim=999, savefuns=TRUE, correction="translate",
simulate=expression(runifpoint(pp$n, win=pp$window)))
res_qdir <- qdir_envelope(env) # The directional quantile envelope test
plot(res_qdir)
# or (requires R library ggplot2)
plot(res_qdir, plot_style="ggplot2")
## 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)
# For better visualisation, take the L(r)-r function
curve_set <- residual(curve_set, use_theo=TRUE)
# The directional quantile envelope test
res_qdir <- qdir_envelope(curve_set); plot(res_qdir, plot_style="ggplot2")
# The studentised envelope test
res_st <- st_envelope(curve_set); plot(res_st, plot_style="ggplot2")
# The unscaled envelope test
res_unscaled <- unscaled_envelope(curve_set); plot(res_unscaled, plot_style="ggplot2")
}
``` |

myllym/GET documentation built on Dec. 23, 2018, 1:04 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.