rast.ed.ses | R Documentation |
Calculates the standardized effect size for evolutionary distinctiveness. See Details for more information.
rast.ed.ses(
x,
tree,
edge.path,
branch.length,
n.descen,
full_tree_metr = TRUE,
spat_alg = "bootspat_str",
spat_alg_args = list(rprob = NULL, rich = NULL, fr_prob = NULL),
aleats = 10,
filename = "",
...
)
x |
SpatRaster. A SpatRaster containing presence-absence data (0 or 1) for a set of species. The layers (species) will be sorted according to the tree order. See the phylo.pres function. |
tree |
phylo. A dated tree. |
edge.path |
matrix. Matrix representing the paths through the tree from
root to each tip. See |
branch.length |
numeric. A Named numeric vector of branch length for
each species. See |
n.descen |
numeric. A Named numeric vector of number of descendants for
each branch. See |
full_tree_metr |
logical. Whether edge.path, branch length and number of descendants should be calculated with the full (TRUE) or the prunned tree (FALSE). The default is TRUE. |
spat_alg |
A function with the algorithm implementing the desired
randomization method. It must work with SpatRaster objects. See examples.
Example of functions that work are: |
spat_alg_args |
List of arguments passed to the randomization method
chosen in 'spat_alg'. See |
aleats |
positive integer. A positive integer indicating how many times the calculation should be repeated. |
filename |
character. Output filename |
... |
additional arguments passed for terra::app |
The dependency ‘SESraster’ is used to calculate the null models. This package currently implements six algorithms to randomize binary species distribution with several levels of constraints: SIM1, SIM2, SIM3, SIM5, SIM6 and SIM9 (sensu Gotelli 2000). The methods implemented in ‘SESraster’ are based on how species (originally rows) and sites (originally columns) are treated (i.e. fixed, equiprobable, or proportional sums) (Gotelli 2000). By default, the ‘phyloraster’ uses the function bootspat_ str() from the ‘SESraster’ package to conduct the randomizations, but the user is free to choose any of the other methods mentioned above through the spat_alg argument in the *.ses() functions of the ‘phyloraster’ package. The bootspat_str() is equivalent to the SIM5 (proportional-fixed) method of Gotelli (2000), which partially relaxes the spatial structure of species distributions, but keeps the spatial structure of the observed richness pattern across cells.
SpatRaster. The function returns the observed value of the metric, the mean of the simulations calculated over n times, the standard deviation of the simulations, the standardized effect size (SES) for the metric, and the p-values.
Neander M. Heming and Gabriela Alves-Ferreira
Gotelli, N. J. 2000. Null model analysis of species co-occurrence patterns. – Ecology 81: 2606–2621.
Heming, N. M., Mota, F. M. M. and Alves-Ferreira, G. 2023. SESraster: raster randomization for null hypothesis testing. https://CRAN.R-project.org/package=SESraster.
phylo.pres
,
inv.range
,
geo.phylo.ses
,
rast.ed.ses
,
rast.pd.ses
,
rast.we.ses
,
rast.pe.ses
,
bootspat_str
,
bootspat_naive
,
bootspat_ff
,
SESraster
library(phyloraster)
library(SESraster)
x <- terra::rast(system.file("extdata", "rast.presab.tif",
package="phyloraster"))
tree <- ape::read.tree(system.file("extdata", "tree.nex",
package="phyloraster"))
t <- rast.ed.ses(x[[1:10]], tree, aleats = 3)
terra::plot(t)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.