# Determining an optimum and distribution range from species abundance vs environmental gradient data [duplicate]

Hi and thanks for any help re the below

This is a fairly complex question so I will attempt to ask it in a fairly basic manor.

I have data on the abundance of 99 different species of estuarine macroinvertebrate species and the sediment mud content (0 - 100 %) in which each observation was obtained. I have a total of 1402 observations for each species (i.e. a massive dataset).

Here is a subset of the raw data for one species to give you an idea of the data I'm working with (if I had 10 reputation points i'd upload a plot of real raw data:

Abundance: 10,14,10,3,3,3,3,4,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,12,0,0,0,34,0,0
Mud %:     0.9,4,2,10,13,14,6,5,5,7,22,27,34,37,47,58,54,70,54,80,90,65,56,7,8,34,67,54,32,1,57,45,49,4,78,65,45,35


The primary aim of my research is to determine an "optimum mud % range" (e.g. 15 - 45 %) and "distribution mud % range" (e.g. 0 - 80 %) for each of the 99 invertebrate species.

As you can see the abundance data for the above species contains a significant number of zero values. Although this significantly skews any sort of model that I run on the data (i.e. GLM, GAM), even if I model the non-zero data only, the model for certain species does not fit the data at all well.

So, my question is: what would be the best, most robust way to determine an "optimum" and "distribution" mud range for a given species, given that responses vary significantly between species?

• I think you might get more answers if you ask this on Cross Validated. It is more a stat question than a programming quesion. Besides, I am not sure you want an optimum/distribution range for all species or for each species. Aug 13, 2013 at 9:55
• Ok, thanks for the heads up there. Also, I mean for an individual species. Aug 13, 2013 at 10:07
range(df$mud[df$abundance>0])

I don't know if you have a different abundance column for each species or a column which indicates the species name so I can't advise on getting all 99 ranges - but a loop or using an apply() type function should work