dev2div: Converts deviances to diversities

Description Usage Arguments Value See Also Examples

View source: R/dev2div.R

Description

Takes either (1) a mdm or (2) a scaler, vector or matrix of deviances, and extracts or converts then to diverities. The relationship between deviance (dev) and diversity (d) is given by div = exp(dev/2/n) where n is the number of units (typically rows of a matrix) over which deviance is being averaged.

Usage

1
dev2div(x, n)

Arguments

x

a mdm or a scaler, vector or matrix of deviances.

n

if x is not a mdm, then the divisor in the conversion as defined as above.

Value

The diversity of x.

See Also

ed, ed1, eds, eds1

Examples

1
2
x <- c(5,10,15)
dev2div(x,n=10)

MDM documentation built on May 30, 2017, 4:58 a.m.