Solved
New Contributor
Posts: 3

# How do I run diversity index calculation on individual replicates for a single column of sample data

Suppose I have the following data in a single column (I've placed it in a row to save space but we alwasy work with it in a column):

2 3 5 6 7 7 8 9 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 20

Each number represents a differents species, and the number of each number represents the number of individuals of that species identified in the sample set (so in the above set there were two individuals of species "7").

I want to take repeatedly sample 10 individuals from the above set, AND THEN run Simpson's/Shannon's diversity index individually on each replicate, AND THEN determine a mean diversity based on the diversity of all individual replicates.

I'm a major beginner at SAS, from what I can tell I have proprietary software 9.3 with enhanced analytical products in the 12.1-12.2 region. I've figured out how to do the repeated sampling using the following:

*********************************

proc surveyselect data = arrival  method = urs sampsize = 10
rep = 10 out = my_data;
run;

*********************************

Can someone help me with the rest of the steps please?

p.s. I also don't know if my method of analysis is statistically viable, it is my attempt to compare the genetic diversity of two populations for each of which we have a different number of samples. The different sample sizes prevent direct comparison of genetic diversity, so I thought we could subsample the larger set down to the size of the smaller set. If you have a big sexy statistical brain I would appreciate comments on this idea as well.

Accepted Solutions
Solution
‎07-05-2016 11:06 AM
Posts: 5,529

## Re: How do I run diversity index calculation on individual replicates for a single column of sample

You should be subsampling your sample sets, not your species. The field sampling method must be the same for both populations for this comparison to be valid.

PG

All Replies
Solution
‎07-05-2016 11:06 AM
Posts: 5,529

## Re: How do I run diversity index calculation on individual replicates for a single column of sample

You should be subsampling your sample sets, not your species. The field sampling method must be the same for both populations for this comparison to be valid.

PG
New Contributor
Posts: 3

## Re: How do I run diversity index calculation on individual replicates for a single column of sample

I'm sorry, I think I worded it poorly; I am not looking at genetic diversity I am looking at species diversity. So using animals as an example: if site A has 4 rabbits, 3 racoons and a skunk, and site B has 6 rabbits, 11 racoons, a skunk and a fox I want to compare which site has more species diversity, but because I have different sample sizes I want to subsample Site B to get its sample size equal to Site A (since sample size affects species richness and therefore species diversity)

Posts: 5,529

## Re: How do I run diversity index calculation on individual replicates for a single column of sample

What do you call a sample in which you identify species? It should be something like "setting a trap for 48 h" or "listening to bird calls for 15 m" or "counting bacteria in 10 ul". I.e. it should represent a standardized effort. Otherwise, you can't compare species diversity between sites or populations.

PG
New Contributor
Posts: 3

## Re: How do I run diversity index calculation on individual replicates for a single column of sample

Thank you, it seems I need to go back and re-evaluate some of our methods before I proceed, rending my initial question moot.

☑ This topic is solved.