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 [0,1], with all lines summing to 1, giving the transition matrix from which the conditional diversity values are computed.

distribution

A vector of floats in [0,1] and summing to 1 giving the probability distribution that is used to weight the diversity values when computing their geometric means. It should hence contain as many values as there are rows in the input transition. If not specified, this distribution is assumed uniform.

order

A vector of positive floats (possibly including Inf) giving the orders of the diversity measures to be computed. If neither order nor measure is specified, a predefined list of 8 diversity measures is computed.

measure

A vector of strings giving the names of the diversity measures to compute. Possible values are richness, entropy, herfindahl, and bergerparker.

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))


[Package triversity version 1.0 Index]