Generates a null distribution of concurrent temporal niche overlap by
repeatedly randomizing the input matrix with rosario_sample() and
recomputing the mean pairwise overlap (see temp_overlap()).
get_null_model(mat, method, nsim = 1000, parallel = FALSE)A list with components:
Mean from all possible pairwise comparisons among biological identities for mat.
A one-sample t.test object comparing null means to the
observed value (mu = observed).
A tibble/data.frame of simulated mean overlaps (one per randomization).
Numeric matrix (rows = biological identities, columns = ordered time intervals).
Character string naming the overlap index to use:
"pianka" or "czekanowski".
Integer number of randomizations to run (default 100).
Logical. If TRUE, randomizations are executed in parallel
using furrr::future_map_dfr() with a multisession plan set internally.
For "czekanowski", rows are rescaled to proportions internally to
satisfy the index's assumptions. Randomization preserves each row's
temporal autocorrelation by cyclically shifting (and optionally mirroring)
its profile; see rosario_sample().
When parallel = TRUE, the function calls future::plan(multisession)
internally so that randomizations are distributed across available local
sessions. This means the function overrides any previously set future plan.
If you need custom control over parallelization (e.g. cluster backends),
run the non-parallel mode (parallel = FALSE) and handle parallelism
externally.
temp_overlap(), rosario_sample(), temp_overlap_matrix()
get_null_model(ex1, method = "pianka", nsim = 10, parallel = FALSE)
Run the code above in your browser using DataLab