scanLRTS {spatstat.explore}R Documentation

Likelihood Ratio Test Statistic for Scan Test

Description

Calculate the Likelihood Ratio Test Statistic for the Scan Test, at each spatial location.

Usage

scanLRTS(X, r, ...,
   method = c("poisson", "binomial"),
   baseline = NULL, case = 2,
   alternative = c("greater", "less", "two.sided"),
   saveopt = FALSE,
   Xmask = NULL)

Arguments

X

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

r

Radius of circle to use. A single number or a numeric vector.

...

Optional. Arguments passed to as.mask to determine the spatial resolution of the computations.

method

Either "poisson" or "binomial" specifying the type of likelihood.

baseline

Baseline for the Poisson intensity, if method="poisson". A pixel image or a function.

case

Which type of point should be interpreted as a case, if method="binomial". Integer or character string.

alternative

Alternative hypothesis: "greater" if the alternative postulates that the mean number of points inside the circle will be greater than expected under the null.

saveopt

Logical value indicating to save the optimal value of r at each location.

Xmask

Internal use only.

Details

This command computes, for all spatial locations u, the Likelihood Ratio Test Statistic \Lambda(u) for a test of homogeneity at the location u, as described below. The result is a pixel image giving the values of \Lambda(u) at each pixel.

The maximum value of \Lambda(u) over all locations u is the scan statistic, which is the basis of the scan test performed by scan.test.

If r is a vector of more than one value for the radius, then the calculations described above are performed for every value of r. Then the maximum over r is taken for each spatial location u. The resulting pixel value of scanLRTS at a location u is the profile maximum of the Likelihood Ratio Test Statistic, that is, the maximum of the Likelihood Ratio Test Statistic for circles of all radii, centred at the same location u.

If you have already performed a scan test using scan.test, the Likelihood Ratio Test Statistic can be extracted from the test result using the function as.im.scan.test.

Value

A pixel image (object of class "im") whose pixel values are the values of the (profile) Likelihood Ratio Test Statistic at each spatial location.

Warning: window size

Note that the result of scanLRTS is a pixel image on a larger window than the original window of X. The expanded window contains the centre of any circle of radius r that has nonempty intersection with the original window.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au

and Rolf Turner rolfturner@posteo.net

References

Kulldorff, M. (1997) A spatial scan statistic. Communications in Statistics — Theory and Methods 26, 1481–1496.

See Also

scan.test, as.im.scan.test

Examples

   plot(scanLRTS(redwood, 0.1, method="poisson"))
   sc <- scanLRTS(chorley, 1, method="binomial", case="larynx") 
   plot(sc)
   scanstatchorley <- max(sc)

[Package spatstat.explore version 3.2-7 Index]