Description Usage Arguments Details Value References See Also
Adjusted global rank envelope test, studentized envelope test and directional quantile envelope test.
1 2 3 4 5 6 | dg.global_envelope(X, nsim = 499, nsimsub = nsim, simfun = NULL,
fitfun = NULL, ..., test = c("rank", "qdir", "st"), alpha = 0.05,
alternative = c("two.sided", "less", "greater"), r_min = NULL,
r_max = NULL, take_residual = FALSE, save.cons.envelope = savefuns ||
savepatterns, savefuns = FALSE, savepatterns = FALSE, verbose = TRUE,
mc.cores = 1L)
|
X |
An object containing point pattern data. A point pattern (object of class "ppp")
or a fitted point process model (object of class "ppm" or "kppm"). See
|
nsim |
The number of simulations to be generated in the primary test. |
nsimsub |
Number of simulations in each basic test. There will be nsim repetitions of the basic test, each involving nsimsub simulated realisations, so there will be a total of nsim * (1 + nsimsub) simulations. |
simfun |
A function for generating simulations from the null model. If given, this function
is called by replicate(n=nsim, simfun(simfun.param), simplify=FALSE) to make nsim simulations.
The function should return an |
fitfun |
A function for estimating the parameters of the null model. If not given, then
|
... |
Additional parameters passed to |
test |
Either "rank" for the |
alpha |
The significance level. The 100(1-alpha)% global envelope will be calculated. |
alternative |
A character string specifying the alternative hypothesis. Must be one of the following: "two.sided" (default), "less" or "greater" for "rank". Relevant only for the rank test (otherwise ignored). |
r_min |
The minimum radius to include in the test. |
r_max |
The maximum radius to include in the test. Note: cannot be larger than r-values used
in calculating functions by |
take_residual |
If (needed for visual reasons only) the theoretical or mean behaviour of the
test function is reduced from the test functions. If TRUE, then: If |
save.cons.envelope |
Logical flag indicating whether to save the unadjusted envelope test results. |
savefuns |
Logical flag indicating whether to save all the simulated function values.
See |
savepatterns |
Logical flag indicating whether to save all the simulated point patterns.
See |
verbose |
Logical flag indicating whether to print progress reports during the simulations.
See |
mc.cores |
The number of cores to use, i.e. at most how many child processes will be run simultaneously.
Must be at least one, and parallelization requires at least two cores. On a Windows computer mc.cores must be 1
(no parallelization). For details, see |
The specification of X is important here:
1) If simfun = NULL and fitfun = NULL (default), then envelope
is used for generating simulations under the null hypothesis and
If X is a point pattern, the null hypothesis is CSR.
If X is a fitted model, the null hypothesis is that model.
2) The user can provide the function for fitting the model (fitfun) and for simulating
from the fitted model (simfun). These functions should be coupled with each other such
that the object returned by 'fitfun' is directly accepted as the (single) argument in 'simfun'.
Further X should then be an ppp
object and 'fitfun' should accept as
the argument an ppp
object (X and further simulated point patterns).
A note: The structure of the code, which utilizes envelope
though the
function global_envelope_with_sims
, mimics the structure in the function
dg.envelope
in the use of envelope
.
However, this function allows for more general use as described above.
An object of class adjusted_envelope_test.
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.
Myllymäki, M., Mrkvička, T., Grabarnik, P., Seijo, H. and Hahn, U. (2015). Global envelope tests for spatial point patterns. arXiv:1307.0239v4 [stat.ME]
rank_envelope
, qdir_envelope
, st_envelope
,
plot.adjusted_envelope_test
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.