| get_conditional_diversity_from_transition {triversity} | R Documentation |
Compute the conditional diversity of a transition matrix.
Description
get_conditional_diversity_from_transition computes the geometric means of diversity
values associated to the lines of the input transition matrix, while weighting these values
according to an optional input distribution. This hence allows to compute conditional
diversity values associated to the matrix.
Usage
get_conditional_diversity_from_transition(transition, distribution = NULL,
order = NULL, measure = NULL)
Arguments
transition |
A matrix of floats in [ |
distribution |
A vector of floats in [ |
order |
A vector of positive floats (possibly including |
measure |
A vector of strings giving the names of the diversity measures to compute.
Possible values are |
Value
A vector of positive floats giving the conditional diversity values of the input
transition matrix, that is the geometric means of the diversity values associated
to its rows.
Examples
transition <- matrix (c (1/3, 1/3, 1/3, 0.9, 0.1, 0), nrow=2, ncol=3, byrow=TRUE)
get_conditional_diversity_from_transition (transition, order=c(0,Inf), measure='entropy')
get_conditional_diversity_from_transition (transition, distribution=c(0.75,0.25))