4

I am interested in examining how the species diversity of bird communities change following timber harvest and have used Vegan in R to run my analyses. Below is a sample of my count data. Plot names are in the columns and corresponding species counts are in the rows (species are a 4-letter code).

    SRSFC1_post SRSFC1_pre SRSFT1_post SRSFT1_pre SRSFT2_post 
AMRE           0          0           1          0           0          
AMRO           5          1           5         12           1          
BCCH           1          2           1          3           4         
BHCO           0          0           0          0           0  

I calculated Shannon's index for each plot, but have not been able to calculate standard errors for the indexes. Can anyone advise me on how to calculate standard error for the Shannon's index in R? If more details are needed please let me know and thank you in advance.

Update - I used bootstrapping to calculate confidence intervals as well as to compare to Shannon's indices for bird communities pre- and post-harvest. My understanding is that bootstrapping essentially works by repeatedly taking a sub-sample of a data set, and confidence intervals can be calculated using these data sets.

For folks that have similar questions I found Mark Gardener's book 'Community Ecology: Analytical Methods Using R and Excel' to be an excellent resource. This topic is addressed in Chapter 9 and R code is provided (I used code on pg. 237).

Books Website: http://www.gardenersown.co.uk/Education/Lectures/Community%20Ecology%20Support%20Files.htm

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
LeahB
  • 41
  • 5
  • 1
    Questions solely about how software works are off topic here, but you may have a real statistical question buried here. You may want to edit your question to clarify the underlying statistical issue. You may find that when you understand the statistical concepts involved, the software-specific elements are self-evident or at least easy to get from the documentation. – gung - Reinstate Monica Dec 31 '15 at 22:15
  • +1, I've wondered about this myself. Such indices are used in demography as well. Question is pretty straight forward, but can you describe your data snippet? – Andy W Jan 01 '16 at 03:08
  • 1
    To compute a standard error you need to know what distribution the statistic follows. I am not there is any good theory on how these diversity metrics will be distributed. Furthermore none of there metrics consider issues of detectability (i.e., how many species you missed) so any standard error estimate will be an underestimate. Finally when all else fails, you can consider bootstrapping your statistic (which has its own). – Rider_X Jan 01 '16 at 04:50
  • @AndyW The data I posted above is a portion of bird survey data. The 1st column is the 4-letter code for a bird species and the counts correspond to the number of each species observed in each plot (column labels). – LeahB Jan 04 '16 at 15:30
  • Eric Smith in an Encyclopedia entry [*Ecological Statistics*](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.177.9550&rep=rep1&type=pdf) states in regards to diversity measures "variance estimates may be calculated for these measures using the delta method, or the jackknife for bootstrap". He gives two references for this statement, *Biostatistical Analysis* (Zar, 1984) and Heltsche & Forrester (1985) *Statistical evaluation of the jackknife estimate of diversity when using quadrat samples*. – Andy W Jan 04 '16 at 16:04
  • It would be helpful for future users of the site to expand your latest edit into an answer (you can answer your own question) that explains briefly how the standard error is calculated (the statistical principles, not the code) and if possible add in the answer a web link to the book for those who want further details. – EdM Dec 28 '17 at 20:52
  • @EdM Thanks for the advice; I will add more info as suggested. – LeahB Dec 28 '17 at 20:56

1 Answers1

1

The question is answered by OP, but as part of the question text! I copy parts of that answer here, so that the Q is formally answered.

I used bootstrapping to calculate confidence intervals as well as to compare to Shannon's indices for bird communities pre- and post-harvest. My understanding is that bootstrapping essentially works by repeatedly taking a sub-sample of a data set, and confidence intervals can be calculated using these data sets.

For folks that have similar questions I found Mark Gardener's book 'Community Ecology: Analytical Methods Using R and Excel' to be an excellent resource. This topic is addressed in Chapter 9 and R code is provided (I used code on pg. 237).

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
  • 1
    This is correct for calculating standard errors, but the bias in plug-in estimates of the Shannon index leads to problems with where to place the confidence intervals. See [this question](https://stats.stackexchange.com/q/156235/28500) and its answers for details. – EdM May 14 '19 at 00:32