dclf.progress

0th

Percentile

Progress Plot of Test of Spatial Pattern

Generates a progress plot (envelope representation) of the Diggle-Cressie-Loosmore-Ford test or the Maximum Absolute Deviation test for a spatial point pattern.

Keywords
htest, spatial
Usage
dclf.progress(X, …)
mad.progress(X, …)
mctest.progress(X, fun = Lest, …,
                exponent = 1, nrank = 1,
                interpolate = FALSE, alpha, rmin=0)
Arguments
X

Either a point pattern (object of class "ppp", "lpp" or other class), a fitted point process model (object of class "ppm", "kppm" or other class) or an envelope object (class "envelope").

Arguments passed to mctest.progress or to envelope. Useful arguments include fun to determine the summary function, nsim to specify the number of Monte Carlo simulations, alternative to specify one-sided or two-sided envelopes, and verbose=FALSE to turn off the messages.

fun

Function that computes the desired summary statistic for a point pattern.

exponent

Positive number. The exponent of the \(L^p\) distance. See Details.

nrank

Integer. The rank of the critical value of the Monte Carlo test, amongst the nsim simulated values. A rank of 1 means that the minimum and maximum simulated values will become the critical values for the test.

interpolate

Logical value indicating how to compute the critical value. If interpolate=FALSE (the default), a standard Monte Carlo test is performed, and the critical value is the largest simulated value of the test statistic (if nrank=1) or the nrank-th largest (if nrank is another number). If interpolate=TRUE, kernel density estimation is applied to the simulated values, and the critical value is the upper alpha quantile of this estimated distribution.

alpha

Optional. The significance level of the test. Equivalent to nrank/(nsim+1) where nsim is the number of simulations.

rmin

Optional. Left endpoint for the interval of \(r\) values on which the test statistic is calculated.

Details

The Diggle-Cressie-Loosmore-Ford test and the Maximum Absolute Deviation test for a spatial point pattern are described in dclf.test. These tests depend on the choice of an interval of distance values (the argument rinterval). A progress plot or envelope representation of the test (Baddeley et al, 2014) is a plot of the test statistic (and the corresponding critical value) against the length of the interval rinterval.

The command dclf.progress performs dclf.test on X using all possible intervals of the form \([0,R]\), and returns the resulting values of the test statistic, and the corresponding critical values of the test, as a function of \(R\).

Similarly mad.progress performs mad.test using all possible intervals and returns the test statistic and critical value.

More generally, mctest.progress performs a test based on the \(L^p\) discrepancy between the curves. The deviation between two curves is measured by the \(p\)th root of the integral of the \(p\)th power of the absolute value of the difference between the two curves. The exponent \(p\) is given by the argument exponent. The case exponent=2 is the Cressie-Loosmore-Ford test, while exponent=Inf is the MAD test.

If the argument rmin is given, it specifies the left endpoint of the interval defining the test statistic: the tests are performed using intervals \([r_{\mbox{\scriptsize min}},R]\) where \(R \ge r_{\mbox{\scriptsize min}}\).

The result of each command is an object of class "fv" that can be plotted to obtain the progress plot. The display shows the test statistic (solid black line) and the Monte Carlo acceptance region (grey shading).

The significance level for the Monte Carlo test is nrank/(nsim+1). Note that nsim defaults to 99, so if the values of nrank and nsim are not given, the default is a test with significance level 0.01.

If X is an envelope object, then some of the data stored in X may be re-used:

  • If X is an envelope object containing simulated functions, and fun=NULL, then the code will re-use the simulated functions stored in X.

  • If X is an envelope object containing simulated point patterns, then fun will be applied to the stored point patterns to obtain the simulated functions. If fun is not specified, it defaults to Lest.

  • Otherwise, new simulations will be performed, and fun defaults to Lest.

Value

An object of class "fv" that can be plotted to obtain the progress plot.

References

Baddeley, A., Diggle, P., Hardegen, A., Lawrence, T., Milne, R. and Nair, G. (2014) On tests of spatial pattern based on simulation envelopes. Ecological Monographs 84 (3) 477--489.

See Also

dclf.test and mad.test for the tests.

See plot.fv for information on plotting objects of class "fv".

Aliases
  • dclf.progress
  • mad.progress
  • mctest.progress
Examples
# NOT RUN {
  plot(dclf.progress(cells, nsim=19))
# }
Documentation reproduced from package spatstat, version 1.56-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.