# dclf.sigtrace

##### Significance Trace of Cressie-Loosmore-Ford or Maximum Absolute Deviation Test

Generates a Significance Trace of the Diggle(1986)/ Cressie (1991)/ Loosmore and Ford (2006) test or the Maximum Absolute Deviation test for a spatial point pattern.

##### Usage

```
dclf.sigtrace(X, …)
mad.sigtrace(X, …)
mctest.sigtrace(X, fun=Lest, …,
exponent=1, interpolate=FALSE, alpha=0.05,
confint=TRUE, rmin=0)
```

##### Arguments

- X
Either a point pattern (object of class

`"ppp"`

,`"lpp"`

or other class), a fitted point process model (object of class`"ppm"`

,`"kppm"`

or other class) or an envelope object (class`"envelope"`

).- …
Arguments passed to

`envelope`

or`mctest.progress`

. Useful arguments include`fun`

to determine the summary function,`nsim`

to specify the number of Monte Carlo simulations,`alternative`

to specify a one-sided test, and`verbose=FALSE`

to turn off the messages.- fun
Function that computes the desired summary statistic for a point pattern.

- exponent
Positive number. The exponent of the \(L^p\) distance. See Details.

- interpolate
Logical value specifying whether to calculate the \(p\)-value by interpolation. If

`interpolate=FALSE`

(the default), a standard Monte Carlo test is performed, yielding a \(p\)-value of the form \((k+1)/(n+1)\) where \(n\) is the number of simulations and \(k\) is the number of simulated values which are more extreme than the observed value. If`interpolate=TRUE`

, the \(p\)-value is calculated by applying kernel density estimation to the simulated values, and computing the tail probability for this estimated distribution.- alpha
Significance level to be plotted (this has no effect on the calculation but is simply plotted as a reference value).

- confint
Logical value indicating whether to compute a confidence interval for the ‘true’ \(p\)-value.

- rmin
Optional. Left endpoint for the interval of \(r\) values on which the test statistic is calculated.

##### Details

The Diggle (1986)/ Cressie (1991)/Loosmore and Ford (2006) test and the
Maximum Absolute Deviation test for a spatial point pattern
are described in `dclf.test`

.
These tests depend on the choice of an interval of
distance values (the argument `rinterval`

).
A *significance trace* (Bowman and Azzalini, 1997;
Baddeley et al, 2014, 2015)
of the test is a plot of the \(p\)-value
obtained from the test against the length of
the interval `rinterval`

.

The command `dclf.sigtrace`

performs
`dclf.test`

on `X`

using all possible intervals
of the form \([0,R]\), and returns the resulting \(p\)-values
as a function of \(R\).

Similarly `mad.sigtrace`

performs
`mad.test`

using all possible intervals
and returns the \(p\)-values.

More generally, `mctest.sigtrace`

performs a test based on the
\(L^p\) discrepancy between the curves. The deviation between two
curves is measured by the \(p\)th root of the integral of
the \(p\)th power of the absolute value of the difference
between the two curves. The exponent \(p\) is
given by the argument `exponent`

. The case `exponent=2`

is the Cressie-Loosmore-Ford test, while `exponent=Inf`

is the
MAD test.

If the argument `rmin`

is given, it specifies the left endpoint
of the interval defining the test statistic: the tests are
performed using intervals \([r_{\mbox{\scriptsize min}},R]\)
where \(R \ge r_{\mbox{\scriptsize min}}\).

The result of each command
is an object of class `"fv"`

that can be plotted to
obtain the significance trace. The plot shows the Monte Carlo
\(p\)-value (solid black line),
the critical value `0.05`

(dashed red line),
and a pointwise 95% confidence band (grey shading)
for the ‘true’ (Neyman-Pearson) \(p\)-value.
The confidence band is based on the Agresti-Coull (1998)
confidence interval for a binomial proportion (when
`interpolate=FALSE`

) or the delta method
and normal approximation (when `interpolate=TRUE`

).

If `X`

is an envelope object and `fun=NULL`

then
the code will re-use the simulated functions stored in `X`

.

##### Value

An object of class `"fv"`

that can be plotted to
obtain the significance trace.

##### References

Agresti, A. and Coull, B.A. (1998)
Approximate is better than “Exact” for interval
estimation of binomial proportions.
*American Statistician* **52**, 119--126.

Baddeley, A., Diggle, P., Hardegen, A., Lawrence, T.,
Milne, R. and Nair, G. (2014)
On tests of spatial pattern based on simulation envelopes.
*Ecological Monographs* **84**(3) 477--489.

Baddeley, A., Hardegen, A., Lawrence, L., Milne, R.K., Nair, G.M. and Rakshit, S. (2015) Pushing the envelope: extensions of graphical Monte Carlo tests. Submitted for publication.

Bowman, A.W. and Azzalini, A. (1997)
*Applied smoothing techniques for data analysis:
the kernel approach with S-Plus illustrations*.
Oxford University Press, Oxford.

##### See Also

`dclf.test`

for the tests;
`dclf.progress`

for progress plots.

See `plot.fv`

for information on plotting
objects of class `"fv"`

.

See also `dg.sigtrace`

.

##### Examples

```
# NOT RUN {
plot(dclf.sigtrace(cells, Lest, nsim=19))
# }
```

*Documentation reproduced from package spatstat, version 1.52-1, License: GPL (>= 2)*