Likelihood Ratio Test Statistic for Scan Test
Calculate the Likelihood Ratio Test Statistic for the Scan Test, at each spatial location.
scanLRTS(X, r, ..., method = c("poisson", "binomial"), baseline = NULL, case = 2, alternative = c("greater", "less", "two.sided"), saveopt = FALSE, Xmask = NULL)
- A point pattern (object of class
- Radius of circle to use. A single number or a numeric vector.
- Optional. Arguments passed to
as.maskto determine the spatial resolution of the computations.
"binomial"specifying the type of likelihood.
- Baseline for the Poisson intensity, if
method="poisson". A pixel image or a function.
- Which type of point should be interpreted as a case,
method="binomial". Integer or character string.
- Alternative hypothesis:
"greater"if the alternative postulates that the mean number of points inside the circle will be greater than expected under the null.
- Logical value indicating to save the optimal value of
rat each location.
- Internal use only.
This command computes, for all spatial locations
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
method="poisson"then the test statistic is based on Poisson likelihood. The dataset
Xis treated as an unmarked point pattern. By default (if
baselineis not specified) the null hypothesis is complete spatial randomness CSR (i.e. a uniform Poisson process). At the spatial location$u$, the alternative hypothesis is a Poisson process with one intensity$\beta_1$inside the circle of radius
rcentred at$u$, and another intensity$\beta_0$outside the circle. If
baselineis given, then it should be a pixel image or a
function(x,y). The null hypothesis is an inhomogeneous Poisson process with intensity proportional to
baseline. The alternative hypothesis is an inhomogeneous Poisson process with intensity
beta1 * baselineinside the circle, and
beta0 * baselineoutside the circle.
method="binomial"then the test statistic is based on binomial likelihood. The dataset
Xmust be a bivariate point pattern, i.e. a multitype point pattern with two types. The null hypothesis is that all permutations of the type labels are equally likely. The alternative hypothesis is that the circle of radius
rcentred at$u$has a higher proportion of points of the second type, than expected under the null hypothesis.
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$.
- 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
The expanded window contains the centre of any circle
that has nonempty intersection with the original window.
Kulldorff, M. (1997) A spatial scan statistic. Communications in Statistics --- Theory and Methods 26, 1481--1496.
plot(scanLRTS(redwood, 0.1, method="poisson")) sc <- scanLRTS(chorley, 1, method="binomial", case="larynx") plot(sc) scanstatchorley <- max(sc)