global_envelope_with_sims: A global envelope test

Description Usage Arguments Details See Also

Description

A global envelope test including simulations from a point process model.

Usage

1
2
3
4
5
6
global_envelope_with_sims(X, nsim, simfun = NULL, simfun.arg = NULL, ...,
  test = c("rank", "qdir", "st"), alpha = 0.05,
  alternative = c("two.sided", "less", "greater"), r_min = NULL,
  r_max = NULL, take_residual = FALSE, lexo = TRUE, ties = NULL,
  save.envelope = TRUE, savefuns = FALSE, savepatterns = FALSE,
  verbose = FALSE)

Arguments

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 envelope.

nsim

The number of 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 ppp object as those are further passed to envelope. If the function is not provided, then envelope is used also for generating the point patterns from the null hypothesis.

simfun.arg

The parameter to be passed to simfun. The function simfun should handle with the structure of simfun.param.

...

Additional parameters passed to envelope. For example, the test function in the argument 'fun' and further specifications regarding that. If envelope is also used to generate simulations under the null hypothesis (if simfun not provided), then also recall to specify how to generate the simulations.

test

Either "rank" for the rank_envelope test, "qdir" for the qdir_envelope test or "st" for the st_envelope test.

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 envelope.

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 envelope provides the theoretical value 'theo' for the simulated model, then this value is used. Otherwise, the theoretical function is taken as the mean of the simulations.

lexo

Logical, whether or not to use lexical ordering for calculation of the p-value. in the rank envelope test. See rank_envelope.

ties

Ties method to be passed to rank_envelope (and then to estimate_p_value. Used to obtain a point estimate for the p-value, if lexo=FALSE. The default point estimate is the mid-rank p-value.

save.envelope

Logical flag indicating whether to save all envelope test results.

savefuns

Logical flag indicating whether to save all the simulated function values. See envelope.

savepatterns

Logical flag indicating whether to save all the simulated point patterns. See envelope.

verbose

Logical flag indicating whether to print progress reports during the simulations. See envelope.

Details

Details of the tests are given in rank_envelope (rank envelope test), qdir_envelope (directional quantile envelope test) and st_envelope (studentized envelope test).

The specification of X is important here: if simfun is not provided, the function envelope is used to generate simulations under the null hypothesis and to calculate the test functions (specified in the arguments ...) and then

If simfun is provided, then the null model is the one simulated by this given function, and X is expected to be a point pattern of ppp object, for which data pattern and simulations envelope calculates the test statistics.

See Also

envelope (that is used to perform simulations), rank_envelope, qdir_envelope, st_envelope


myllym/spptest documentation built on May 23, 2019, noon