spptest: Spatial point process testing

Description Details Typical workflow Summary Further options and functions Author(s) References

Description

The spptest library provides global envelope and deviation tests. Both type of tests are Monte Carlo tests, which demand simulations from the tested null model. Examples are mainly for spatial point processes, but the methods are applicable for any functional (or multivariate vector) data. (In the case of point processes, the functions are typically estimators of summary functions.) The main motivation for this package are the scalings for deviation tests and global envelope tests.

Details

The package supports the use of the R library spatstat for generating simulations and calculating estimators of the chosen summary function, but alternatively these can be done by any other methods, thus allowing for any models/functions.

Typical workflow

In the following, the use of the spptest library is demonstrated by its main function rank_envelope, but alternatively this step can be replaced by a call of another function for envelope or deviation test (the main options are st_envelope, qdir_envelope, deviation_test).

1) The workflow utilizing spatstat:

E.g. Say we have a point pattern, for which we would like to test a hypothesis, as a ppp object.

X <- spruces # an example pattern from spatstat

2) The random labeling test with a mark-weighted K-function

3) The workflow when using your own programs for simulations:

Summary

Thus, to perform a test you always first need to obtain the test function T(r) for your data (T_1(r)) and for each simulation (T_2(r), ..., T_nsim+1(r)) in one way or another. Given the set of the functions T_i(r), i=1,...,nsim+1, you can perform a test by one of the following functions provided in this library:

Envelope tests:

Deviation tests (no graphical interpretation):

Note that the recommended minimum number of simulations for the rank envelope test is nsim=2499, while, for the studentised and directional quantile envelope tests and deviation tests, it is nsim=99 (or 999). (For the normal test, see its documentation.)

See, in particular, rank_envelope for further examples.

Further options and functions

It is possible to modify the curve set T_1(r), T_2(r), ..., T_nsim+1(r) for the test.

(i) You can choose the interval of distances [r_min, r_max] by crop_curves.

(ii) For better visualisation, you can take T(r)-T_0(r) by residual. Here T_0(r) is the expectation of T(r) under the null hypothesis.

The function envelope_to_curve_set can be used to create a curve_set object from the object returned by envelope. An envelope object can also directly be given to the functions crop_curves and residual.

Further, as a further reminder, for composite hypotheses the library provides the function dg.global_envelope. See a detailed example in saplings.

Author(s)

Mari Myllymäki (mari.j.myllymaki@gmail.com, mari.myllymaki@luke.fi), Henri Seijo (henri.seijo@aalto.fi, henri.seijo@iki.fi), Tomáš Mrkvička (mrkvicka.toma@gmail.com), Pavel Grabarnik (gpya@rambler.ru), Ute Hahn (ute@math.au.dk)

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. (2016). Global envelope tests for spatial point patterns. Journal of the Royal Statistical Society: Series B (Statistical Methodology). doi: 10.1111/rssb.12172

Mrkvička, T., Myllymäki, M. and Hahn, U. (2016). Multiple Monte Carlo testing, with applications in spatial point processes. Statistics & Computing, accepted. (Preprint: arXiv:1506.01646 [stat.ME])


myllym/spptest documentation built on May 23, 2019, noon