Calculates measures of diversity with jackknife or bootstrap estimates (D.A. Murray).

### Options

`PRINT` = string tokens |
Controls printed output (`index` , `estimate` ); default `inde` |
---|---|

`INDEX` = string token |
Controls the type of measurement to be calculated (`hshannon` , `qstatistic` , `simpsonyule` , `bergerparker` , `ibrillouin` , `ebrillouin` , `dmcintosh` , `emcintosh` , `evar` , `logseriesalpha` , `lognormallambda` , `jshannon` , `margalef` , `isimpson` , `richness` ); default `hsha` |

`GROUPS` = factor |
Defines the groups if there is more than one sample |

`BMETHOD` = string token |
Controls whether to use the bootstrap or jackknife method (`jackknife` , `bootstrap` ); default `jack` for multiple samples and `boot` for individual samples |

`NBOOT` = scalar |
Number of times to resample in bootstrap; default 100 |

`SEED` = scalar |
Seed for random number generator for bootstrap; default 0 |

`CIPROBABILITY` = scalar |
Probability for the confidence interval produced by either jackknife or bootstrap method; default 0.95 |

### Parameters

`INDIVIDUALS` = variates |
Number of individuals per species |
---|---|

`SPECIES` = variates |
Number of species |

`SAVE` = variate or pointer |
Saves the diversity indices |

### Description

A diversity index is a measure of species diversity within a community that consists of co-occurring populations of several (two or more) different species. There are two components to diversity: richness and evenness. Richness is the measure of the number of species within a sample where the more species in a community the higher the diversity (or greater richness). Evenness is a measure of the relative abundance of the different species within a community. The more nearly equal the species relative abundances the higher the diversity.

`ECDIVERSITY`

can be used to calculate several different measures of diversity. Amongst these indices are the log series α and log-Normal λ which are estimated by fitting an underlying species abundance model, and the *Q* statistic which is derived from cumulative ranked frequencies. Other available indices include the Margalef and Simpsons 1/*D* which emphasize the richness component of diversity. The indices that highlight the evenness component of diversity include Simpsons 1-*D*, McIntosh *D* and *E*, Shannon-Weiner *H*′ and *J*′, Brillouin diversity and evenness index, Berger-Parker and Smith-Wilson evenness measure. Confidence intervals for the measures can be estimated by bootstrapping. For multiple samples, `ECDIVERSITY`

calculates the overall values of the diversity indices, and provides an option to perform jackknifing to produce less bias estimates with a confidence interval.

The numbers of individuals per species are specified using the `INDIVIDUALS`

parameter. The `SPECIES`

parameter specifies a variate containing the number of species for the associated number of individuals denoted in the corresponding element of `INIDIVIDUALS`

. `SPECIES`

can be omitted if each of the values in `INDIVIDUALS`

corresponds to one species. The `GROUPS`

option can be used to calculate measures of diversity for different samples. The `SAVE`

parameter allows the diversity indices to be saved in a variate or in a pointer to a set of variates for each group.

The `PRINT`

option controls printed output, with settings:

`index` |
the index of diversity or evenness, |
---|---|

`estimate` |
bootstrap or jackknife estimate with confidence limits for the statistic. |

The `BMETHOD`

option can be used to select either the bootstrap or jackknife (for multiple samples) method to produce an estimate of the diversity measure with an associated confidence interval. To produce a bootstrap or jackknife estimate for multiple samples each sample must contain the same number of values where each element corresponds to the same species within each sample. For the calculation of the bootstrap confidence intervals of the diversity measures, the `NBOOT`

option specifies how many bootstrap samples to take (default 100). The probability level for the confidence interval can be set by the `CIPROBABILITY`

option; by default 0.95. The `SEED`

option specifies the seed to use in the random number generator used to construct the bootstrap samples. The default value of zero continues an existing sequence of random numbers or, if the generator has not yet been used in this run of Genstat, it initializes the generator automatically.

Options: `PRINT`

, `INDEX`

, `GROUPS`

, `BMETHOD`

, `NBOOT`

, `SEED`

, `CIPROBABILITY`

.

Parameters: `INDIVIDUALS`

, `SPECIES`

, `SAVE`

.

### Method

The log series α index is estimated by fitting a log series model using the `ECFIT`

procedure. The log-Normal λ is the ratio of the *S*^{*} and σ parameters estimated by fitting a Poisson-log-Normal distribution using the `ECFIT`

procedure.

The *Q* statistic is calculated by:

*Q* = ( 0.5 × *n _{R}*

_{1}+ ∑

_{r = R1+1 … R2-1}{

*n*} + 0.5 ×

_{r}*n*

_{R}_{2}) / log(

*R*2 /

*R*1),

where *n _{r}* is the total number of species with abundance

*r*,

*R*1 and

*R*2 are the 25% and 75% quartiles,

*n*

_{R}_{1}is the number of species where R1 lies, and

*n*

_{R}_{2}is the number of species where R2 lies.

The Shannon-Weiner index is evaluated by:

*H*′ = – ∑* _{i}* (

*n*/

_{i}*N*) × log(

*n*/

_{i}*N*)

where *n _{i}* are the individuals,

*N*is total number of individuals.

The Shannon-Weiner evenness (Pielou *J*) is given by

*J*′ = *H*′ / log(*S*)

where *H*′ is the Shannon index and *S* is the total number of species.

The Brillouin index is given by

*HB* = ( log(*N*!) – ∑* _{i}* {log(

*n*!)} ) /

_{i}*N*

where *n _{i}* is the individual in species

*i*and

*N*is total number of individuals.

The Brillouin evenness index is then calculated by

*E* = *HB* / *HBmax*

and

*HBmax* = 1 / *N* × log( *N*! / ( (*N*/*S*)!^{S–r} × ((*N*/*S*)+1)!^{r} )

where *N*/*S* is the integer of *N*/*S* and *r* = *N*–*S*(*N*/*S*)

Simpsons index *D* is calculated by

*D* = ∑* _{i}* {

*n*× (

_{i}*n*– 1)} / (

_{i}*N*× (

*N*– 1))

and is expressed in the output as both 1-*D* and 1/*D*

The Margalef index is:

*Dmn* = (*S* – 1) / log(*N*)

where *S* is total number of species and *N* is total number of individuals.

McIntosh’s measure of diversity is expressed as

*D* = (*N* – √( ∑* _{i}* {

*n*

_{i}^{2}} / (

*N*– √(

*N*))

and the evenness measure is given by

*E* = (*N* – √( ∑* _{i}* {

*n*

_{i}^{2}} ) / (

*N*–

*N*/ √(

*S*))

where *n _{i}* is the individual in species

*i*and

*N*is total number of individuals.

The Berger-Parker index is

*d* = *Nmax* / *N*

where *Nmax* is the number of individuals in the most abundant species.

The Evar (Smith and Wilson 1996) evenness index is evaluated by

*Evar* = 1 – 2 / π × arctan( ∑* _{i}* { log(

*n*) – ∑

_{i}*{ log(*

_{j}*n*) } }

_{j}^{2}/

*S*)

where *n _{i}* and

*n*are the number of individuals in species

_{j}*i*and

*j*respectively, and

*S*is the total number of species

Species richness is the total number of species.

The jackknife estimate and standard error are generated by the `JACKKNIFE`

procedure where the estimates are calculated from all samples, and then for the situations where one sample is omitted in turn. The confidence interval is calculated by:

φ +/- t(*n*-1) × se(φ)

where *n* is the number of samples.

The bootstrap confidence intervals are generated using the `BOOTSTRAP`

procedure where all individuals are sampled with replacement and the diversity measures are calculated from these samples.

### Action with `RESTRICT`

If a parameter is restricted the statistics will be calculated using only those units included in the restriction.

### References

Magurran, A.E. (2003). *Measuring Biological Diversity*. Blackwell, Oxford.

Smith, B, & Wilson, J.B. (1996). A consumer’s guide to evenness indices. *Oikos*, 76, 70-82.

### See also

Commands for Ecological data.

### Example

CAPTION 'ECDIVERSITY example'; STYLE=meta FACTOR [NVALUES=69; LEVELS=3; VALUES=23(1...3);\ LABELS=!t('Derrycunnihy oakwood','Muckross yew wood',\ 'Sitka spruce plot')] Location VARIATE [VALUES=35,26,25,21,16,11,6,5,3,3,3,3,3,2,2,2,1,1,1,1,0,0,0,\ 9,20,10,21, 5,14,0,3,2,6,9,2,0,0,0,6,0,0,0,1,1,1,0,\ 14,10, 0,30, 4, 6,0,0,7,3,0,0,0,0,0,0,0,0,0,0,0,0,1]\ Territories ECDIVERSITY [INDEX=hshannon,simpson,berger; GROUPS=Location] Territories