Significance Trace of Dao-Genton Test
Generates a Significance Trace of the Dao and Genton (2014) test for a spatial point pattern.
dg.sigtrace(X, fun = Lest, ..., exponent = 2, nsim = 19, nsimsub = nsim - 1, alternative = c("two.sided", "less", "greater"), rmin=0, leaveout=1, interpolate = FALSE, confint = TRUE, alpha = 0.05, savefuns=FALSE, savepatterns=FALSE, verbose=FALSE)
X |
Either a point pattern (object of class |
fun |
Function that computes the desired summary statistic for a point pattern. |
... |
Arguments passed to |
exponent |
Positive number. Exponent used in the test statistic. Use |
nsim |
Number of repetitions of the basic test. |
nsimsub |
Number of simulations in each basic test. There will be |
alternative |
Character string specifying the alternative hypothesis.
The default ( |
rmin |
Optional. Left endpoint for the interval of r values on which the test statistic is calculated. |
leaveout |
Optional integer 0, 1 or 2 indicating how to calculate the deviation between the observed summary function and the nominal reference value, when the reference value must be estimated by simulation. See Details. |
interpolate |
Logical value indicating whether to interpolate the distribution of the test statistic by kernel smoothing, as described in Dao and Genton (2014, Section 5). |
confint |
Logical value indicating whether to compute a confidence interval for the ‘true’ p-value. |
alpha |
Significance level to be plotted (this has no effect on the calculation but is simply plotted as a reference value). |
savefuns |
Logical flag indicating whether to save the simulated function values (from the first stage). |
savepatterns |
Logical flag indicating whether to save the simulated point patterns (from the first stage). |
verbose |
Logical flag indicating whether to print progress reports. |
The Dao and Genton (2014) test for a spatial point pattern
is described in dg.test
.
This test depends 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 dg.sigtrace
effectively performs
dg.test
on X
using all possible intervals
of the form [0,R], and returns the resulting p-values
as a function of R.
The result is an object of class "fv"
that can be plotted to
obtain the significance trace. The plot shows the
Dao-Genton adjusted
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.
If X
is an envelope object and fun=NULL
then
the code will re-use the simulated functions stored in X
.
If the argument rmin
is given, it specifies the left endpoint
of the interval defining the test statistic: the tests are
performed using intervals [rmin,R]
where R ≥ rmin.
The argument leaveout
specifies how to calculate the
discrepancy between the summary function for the data and the
nominal reference value, when the reference value must be estimated
by simulation. The values leaveout=0
and
leaveout=1
are both algebraically equivalent (Baddeley et al, 2014,
Appendix) to computing the difference observed - reference
where the reference
is the mean of simulated values.
The value leaveout=2
gives the leave-two-out discrepancy
proposed by Dao and Genton (2014).
An object of class "fv"
that can be plotted to
obtain the significance trace.
Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Andrew Hardegen, Tom Lawrence, Robin Milne, Gopalan Nair and Suman Rakshit. Implemented by Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.
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.
Dao, N.A. and Genton, M. (2014) A Monte Carlo adjusted goodness-of-fit test for parametric models describing spatial point patterns. Journal of Graphical and Computational Statistics 23, 497–517.
dg.test
for the Dao-Genton test,
dclf.sigtrace
for significance traces of other tests.
ns <- if(interactive()) 19 else 5 plot(dg.sigtrace(cells, nsim=ns))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.