homtest: Homogeneity Test for Local Poisson or Gibbs Model

View source: R/locppm.R

homtestR 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.

  • test="likelihood": the locally fitted model is computed as locppm(X, ...). The local composite likelihood ratio test statistic of this model is computed at each location, and the mean of this statistic over the window is computed.

  • test="taylor": the locally fitted model is computed as locppm(X, ...). The Taylor approximation to the local composite likelihood ratio test statistic of this model is computed at each location, and the mean of this statistic over the window is computed.

  • test="score": the locally fitted model is computed as locppm(X, ...). The local score test statistic of this model is computed at each location, and the mean of this statistic over the window is computed.

  • method="residuals": the homogeneous model is fitted as ppm(X, ...). The smoothed score residuals of this model are computed at each location, and the mean of the squared norm over the window is computed.

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

.

References

\localpaper \baddrubaturnbook

See Also

To compute the test statistic only, see homtestmap.

Examples

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

baddstats/spatstat.local documentation built on Feb. 23, 2023, 8:32 a.m.