spatstat (version 1.43-0)

dg.test: Dao-Genton Adjusted Goodness-Of-Fit Test

Description

Performs the Dao and Genton (2014) adjusted goodness-of-fit test of spatial pattern.

Usage

dg.test(X, ...,
        exponent = 2, nsim=19, nsimsub=nsim-1,
        alternative=c("two.sided", "less", "greater"),
        interpolate = FALSE,
        savefuns=FALSE, savepatterns=FALSE,
        verbose = TRUE)

Arguments

X
Either a point pattern dataset (object of class "ppp", "lpp" or "pp3") or a fitted point process model (object of class "ppm", "kppm" or "slrm").
...
Arguments passed to dclf.test or mad.test or envelope to control the conduct of the test. Us
exponent
Exponent used in the test statistic. Use exponent=2 for the Diggle-Cressie-Loosmore-Ford test, and exponent=Inf for the Maximum Absolute Deviation test.
nsim
Number of repetitions of the basic test.
nsimsub
Number of simulations in each basic test. There will be nsim repetitions of the basic test, each involving nsimsub simulated realisations, so there will be a total of nsim * (nsimsub + 1) simulations.
alternative
Character string specifying the alternative hypothesis. The default (alternative="two.sided") is that the true value of the summary function is not equal to the theoretical value postulated under the null hypothesis. If
interpolate
Logical value indicating whether to interpolate the distribution of the test statistic by kernel smoothing, as described in Dao and Genton (2014, Section 5).
savefuns
Logical flag indicating whether to save the simulated function values (from the first stage).
savepatterns
Logical flag indicating whether to save the simulated point patterns (from the first stage).
verbose
Logical value indicating whether to print progress reports.

Value

  • A hypothesis test (object of class "htest" which can be printed to show the outcome of the test.

Details

Performs the Dao-Genton (2014) adjusted Monte Carlo goodness-of-fit test, in the modified form described by Baddeley et al (2015). If X is a point pattern, the null hypothesis is CSR.

If X is a fitted model, the null hypothesis is that model.

References

Dao, N.A. and Genton, M. (2014) A Monte Carlo adjusted goodness-of-fit test for parametric models describing spatial point patterns. Journal of Graphical and Computational Statistics 23, 497--517.

Baddeley, A., Hardegen, A., Lawrence, L., Milne, R.K., Nair, G.M. and Rakshit, S. (2015) Pushing the envelope: extensions of graphical Monte Carlo tests. Submitted for publication.

See Also

dclf.test, mad.test

Examples

Run this code
ns <- if(interactive()) 19 else 4
 dg.test(cells, nsim=ns)
 dg.test(cells, alternative="less", nsim=ns)
 dg.test(cells, nsim=ns, interpolate=TRUE)

Run the code above in your browser using DataLab