Last data update: 2014.03.03

R: Calculate alpha, beta and gamma parametric entropies and...
edsR Documentation

Calculate alpha, beta and gamma parametric entropies and diversities

Description

Calculates alpha, beta and gamma parametric diversities of a data set. The matrix or data frame is automatically scaled to row sums of one. Unlike true diversities where weighting is done through the function ed, weighting for parameterized diversity is done within the MDM, or more genrelaly by using case weights.

Usage

eds(x, q = 1, w = 1, retq = TRUE)

Arguments

x

the input matrix or data frame.

w

weights if required.

q

the order of diversity; typically 0, 1 or 2.

retq

if TRUE then parametric diversities are returned; if FALSE the entropies for alpha and gamma are returned.

Value

a vector of entropies or diversities

See Also

dev2div, ed1, ed, eds1

Examples

data(spider6)
eds(spider6[,1:6])
eds(spider6[,1:6],q=0)
eds(spider6[,1:6],q=2)
eds(spider6[,1:6],retq=FALSE)
data(spider6)
eds(spider6[,1:6])

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MDM)
Loading required package: nnet
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MDM/eds.Rd_%03d_medium.png", width=480, height=480)
> ### Name: eds
> ### Title: Calculate alpha, beta and gamma parametric entropies and
> ###   diversities
> ### Aliases: eds
> 
> ### ** Examples
> 
> data(spider6)
> eds(spider6[,1:6])
   alpha     beta    gamma 
2.968079 1.808576 5.367997 
> eds(spider6[,1:6],q=0)
   alpha     beta    gamma 
3.573136 1.581480 5.650842 
> eds(spider6[,1:6],q=2)
   alpha     beta    gamma 
2.252317 2.265076 5.101670 
> eds(spider6[,1:6],retq=FALSE)
  absums   gbsums 
1.087915 1.680455 
> data(spider6)
> eds(spider6[,1:6])
   alpha     beta    gamma 
2.968079 1.808576 5.367997 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>