View source: R/null_dispersion_field_distribution.R
null_dispersion_field_distribution | R Documentation |
null_dispersion_field_distribution estimates a random distribution of the dispersion field values.
null_dispersion_field_distribution(
pam,
n_iter = 10,
randal = "indep_swap",
parallel = TRUE,
n_cores = 2
)
pam |
A Presence-Absence-Matrix of matrix class or sparse matrix. |
n_iter |
Number of iterations to obtain the distribution. |
randal |
Randomization algorithm applied to the PAM. Possible choices "curveball", "fastball", and "indep_swap". |
parallel |
If TRUE the computations will be performed in parallel. |
n_cores |
Number of cores for the parallel computation. |
Estimates a random distribution of the dispersion field values. To obtain
random values it uses the function permute_pam
at each step of the iterations. Randomization of the PAM can be
performed using the "fastball" (Godard and Neal, 2022) and the
"curveball" (Strona et al., 2014), and and the independent
swap (Kembel et al. 2010) algorithms.
The implementation of the "fastball" in C++ is provided
in https://github.com/zpneal/fastball/blob/main/fastball.cpp
A data matrix of size nrow(pam) X n_iter with dispersion field values.
Luis Osorio-Olvera & Jorge Soberón
Soberon2015bamm
\insertRefStrona2014bamm
\insertRefGordard2022bamm
\insertRefKembel2010bamm
set.seed(111)
pam <- matrix(rbinom(100,1,0.3),nrow = 10,ncol = 10)
dfield_rand <- bamm::null_dispersion_field_distribution(pam,n_iter=10,
parallel=FALSE,
randal="indep_swap",
n_cores = 2)
head(dfield_rand)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.