rast.pd.ses {phyloraster} | R Documentation |
Phylogenetic diversity standardized for species richness
Description
Calculates the standardized effect size for phylogenetic diversity. See Details for more information.
Usage
rast.pd.ses(
x,
tree,
edge.path,
branch.length,
spat_alg = "bootspat_str",
spat_alg_args = list(rprob = NULL, rich = NULL, fr_prob = NULL),
random = c("tip", "spat")[2],
aleats = 10,
filename = "",
...
)
Arguments
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 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 |
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 |
random |
character. A character indicating the type of randomization. The currently available randomization methods are "tip", "site", "species" or "both" (site and species). |
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 |
Details
The spatial randomization (spat) keeps the richness exact and samples species presences proportionally to their observed frequency (i.e. number of occupied pixels). The randomization will not assign values to cells with nodata. The phylogenetic randomization shuffles taxa names across all taxa included in phylogeny.
The spatial randomization (spat) keeps the richness exact and samples species presences proportionally to their observed frequency (i.e. number of occupied pixels). The randomization will not assign values to cells with nodata. The phylogenetic randomization shuffles taxa names across all taxa included in phylogeny.
Value
SpatRaster
SpatRaster. The function returns the observed phylogenetic diversity, the mean of the simulations calculated over n times, the standard deviation of the simulations, and the standardized effect size (SES) for the phylogenetic diversity.
Author(s)
Gabriela Alves-Ferreira and Neander Heming
References
Faith, D. P. (1992). Conservation evaluation and phylogenetic diversity. Biological conservation, 61(1), 1-10.
See Also
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
Examples
library(terra)
library(phyloraster)
library(SESraster)
x <- rast(system.file("extdata", "rast.presab.tif",
package="phyloraster"))
tree <- ape::read.tree(system.file("extdata", "tree.nex",
package="phyloraster"))
data <- phylo.pres(x[[1:10]], tree)
t <- rast.pd.ses(data$x, edge.path = data$edge.path,
branch.length = data$branch.length, aleats = 3,
random = "spat")
plot(t)