Learn R Programming

spatstat.explore (version 3.5-3)

studpermu.test: Studentised Permutation Test

Description

Perform a studentised permutation test for a difference between groups of point patterns.

Usage

studpermu.test(X, formula, summaryfunction = Kest,
       ..., rinterval = NULL, nperm = 999,
        use.Tbar = FALSE, minpoints = 20, rsteps = 128,
        r = NULL, arguments.in.data = FALSE)

Arguments

Value

Object of class "studpermutest".

Details

This function performs the studentized permutation test of Hahn (2012) for a difference between groups of point patterns.

The first argument X should be either

a list of lists of point patterns.

Each element of X will be interpreted as a group of point patterns, assumed to be replicates of the same point process.

a hyperframe:

One column of the hyperframe should contain point patterns, and another column should contain a factor indicating the grouping. The argument formula should be a formula in the R language specifying the grouping: it should be of the form P ~ G where P is the name of the column of point patterns, and G is the name of the factor.

A group needs to contain at least two point patterns with at least minpoints points in each pattern.

The function returns an object of class "htest" and "studpermutest" that can be printed and plotted. The printout shows the test result and \(p\)-value. The plot shows the summary functions for the groups (and the group means if requested).

References

Hahn, U. (2012) A studentized permutation test for the comparison of spatial point patterns. Journal of the American Statistical Association 107 (498), 754--764.

See Also

plot.studpermutest

Examples

Run this code
  np <- if(interactive()) 99 else 19
  testpyramidal <- studpermu.test(pyramidal, Neurons ~ group, nperm=np)
  testpyramidal

Run the code above in your browser using DataLab