homtest {spatstat.local}R Documentation

Homogeneity Test for Local Poisson or Gibbs Model

Description

Conducts a Monte Carlo test of homogeneity for a locally-fitted Poisson or Gibbs point process model.

Usage

   homtest(X, ..., nsim = 19,
           test = c("residuals", "score", "taylor", "likelihood"),
           locations = c("coarse", "fine", "split"),
           ladjust = NULL,
           use.fft = NULL,
           simul = NULL,
           verbose = TRUE, Xname = NULL)

Arguments

X

A point pattern (object of class "ppp").

...

Additional arguments passed to locppm to determine the locally fitted model, and passed to ppm to determine the homogeneous model.

nsim

Number of simulations for the Monte Carlo test.

test

The local test statistic to be used: either "likelihood" for the local likelihood ratio test statistic, "taylor" for the Taylor approximation to the local likelihood ratio test statistic, "score" for the local score test statistic, or "residuals" for the squared local residuals.

locations, use.fft

Arguments passed to locppm to control the calculation of variances (if method="local"). See Details.

ladjust

Optional argument passed to homtestmap specifying a data-dependent adjustment of the test statistic.

simul

Optional information that determines how to simulate the realisations from the null hypothesis. An expression in the R language (that will be evaluated nsim times to obtain the simulated patterns), or a list that contains the simulated point patterns.

verbose

Logical value indicating whether to print progress reports.

Xname

Optional character string name for the dataset X, to be printed in the test output.

Details

This function performs a Monte Carlo test of the null hypothesis of homogeneity (i.e.\ constant parameter values) for the locally-fitted Poisson point process or Gibbs point process specified by the arguments.

The type of test is controlled by the argument test.

The test statistic is computed for the data pattern X and for each of nsim simulated realisations from the homogeneous model. The Monte Carlo p-value is computed.

Value

An object of class "htest" containing the test outcome.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au.

References

Baddeley, A. (2017) Local composite likelihood for spatial point patterns. Spatial Statistics 22, 261–295. DOI: 10.1016/j.spasta.2017.03.001

Baddeley, A., Rubak, E. and Turner, R. (2015) Spatial Point Patterns: Methodology and Applications with R. Chapman and Hall/CRC Press.

See Also

To compute the test statistic only, see homtestmap.

Examples

   ## Not run: 
   homtest(swedishpines)
   
## End(Not run)
   

[Package spatstat.local version 5.1-0 Index]