Description Usage Arguments Details Value References See Also
View source: R/adjusted_envelopes.r
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, ..., type = 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 
type 
Either "rank" for the 
alpha 
The significance level. The 100(1alpha)% 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 rvalues 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 goodnessoffit test for parametric models describing spatial point patterns. Journal of Graphical and Computational Statistics 23, 497517.
Myllymäki, M., Mrkvička, T., Grabarnik, P., Seijo, H. and Hahn, U. (2017). Global envelope tests for spatial point patterns. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 79: 381404. doi: 10.1111/rssb.12172
rank_envelope
, qdir_envelope
, st_envelope
,
plot.adjusted_envelope_test
, saplings
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.