View source: R/hespdiv_nullltest.R
| nulltest | R Documentation |
Assess the statistical significance of each split-line (bioregion boundary) identified by hespdiv by comparing its observed performance to a null distribution. The null is generated by permuting the data n times and recomputing the split-line performance after each permutation. Multiple shuffling strategies are supported to probe the influence of spatial structure on delineation.
nulltest(
obj,
n = 999,
maintain.n = TRUE,
shuffle.scope = "within",
shuffle.type = "localities"
)
obj |
An object of class |
n |
Integer. Number of permutations used to form the null distribution. |
maintain.n |
Logical. Only honored when |
shuffle.scope |
Character. Either |
shuffle.type |
Character. Either |
Two shuffling scopes are available:
Shuffle across the entire study area, ignoring polygonal subdivisions.
Shuffle only within each parent polygon (the region in which the split-line is nested), preserving local spatial structure.
Two shuffling types are available:
Shuffle whole localities, preserving each site's assemblage (recommended, since occurrences within a locality are not independent).
Shuffle individual occurrences across sites (use with caution; may violate within-locality independence).
For each split-line, the function reports the observed performance, the mean and standard deviation of the permuted (null) performances, an empirical one-sided p-value (proportion of permuted values as or more extreme than observed; ties included), and a z-score quantifying departure from the null.
Invisibly returns an object of class nullhespdiv, a list with:
$stats, a data frame summarizing each split-line with:
performance: observed performance.
mean.random: mean of null performances.
sd.random: standard deviation of null performances.
p.val: empirical one-sided p-value (ties included).
z.score.random: standardized effect size.
$null, a matrix or data frame containing all null performance
values for every split-line across permutations.
Other functions for hespdiv results post-processing:
cross_comp(),
hsa(),
hsa_detailed(),
hsa_quant(),
hsa_sample_constrained(),
taxon_effect()
# if split-line is strongly significant, the choice of parameters should not
# matter. For example (look at p-value, z.score.random, sd.random and
# mean.random):
(nulltest(example_hespdiv, maintain.n = FALSE, shuffle.type = "occurrences"))
(nulltest(example_hespdiv, maintain.n = FALSE, shuffle.type = "localities"))
(nulltest(example_hespdiv, maintain.n = TRUE, shuffle.type = "localities"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.