GiniSimpson {QSutils} | R Documentation

## Functions to calculate the GiniSimpson index

### Description

GiniSimpson calculates the unbiased estimator, GiniSimpsonVar computes Gini-Simpson asymp- totic variance, and GiniSimpsonMVUE calculates the minimum variance unbiased estimator of the Gini-Simpson index.

### Usage

    GiniSimpson(w)
    GiniSimpsonMVUE(w)
    GiniSimpsonVar(w)

### Arguments

`w` | Vector of observed counts or frequencies.

### Value

A value that corresponds to the Gini-Simpson diversity index.

### Author(s)

Mercedes Guerrero-Murillo and Josep Gregori

### References

Gregori J, Perales C, Rodriguez-Frias F, Esteban JI, Quer J, Domingo E. Viral quasispecies complexity measures. Virology. 2016 Jun;493:227-37. doi: 10.1016/j.virol.2016.03.017. Epub 2016 Apr 6. Review. PubMed PMID: 27060566.

Gregori J, Salicrú M, Domingo E, Sanchez A, Esteban JI, Rodríguez-Frías F, Quer J. Inference with viral quasispecies diversity indices: clonal and NGS approaches. Bioinformatics. 2014 Apr 15;30(8):1104-1111. Epub 2014 Jan 2. PubMed PMID: 24389655.

### Examples

    # A vector of haplotype counts.
    nr <- c(464, 62, 39, 27, 37, 16, 33, 54, 248, 20)

    # Gini-Simpson index.
    GiniSimpson(nr)

    # Gini-Simpson variance.
    GiniSimpsonVar(nr)

    # MVUE Gini-Simpson index.
    GiniSimpsonMVUE(nr)

[Package QSutils version 1.12.0 Index]