Edgar equations in R

For those (few?) of you who are marine benthic ecologists, you may be familiar with the size-fractionated abundance-to-biomass conversion equations proposed by Graham Edgar for benthic/epifaunal invertebrates. Basically, he derived a general equation relating epifaunal abundance to biomass (in mg AFDM), and biomass to rates of secondary production (in ug AFDM per day). For those of you working with small benthic invertebrates, these equations can cut out a lot of work in having to ash each species, with the added benefit of being able to preserve and retain all specimens. However, it can be a tad unwieldy to implement, unless of course, you’re dealing with R!

I wrote the following function to convert epifaunal abundance in different sieve size classes (8.0, 5.6, 4.0, 2.8, 2.0, 1.4, 1.0, 0.71, and 0.5 mm) to estimates of both biomass and total secondary production for the assemblage. I’ve recalculated all conversion values from the original equations (including correcting minor error in Table 2), and extrapolating a new sieve size class for larger organisms (8.0 – > 5.6 mm).

# edgarMethod requires a data frame (x) with the following columns:
  # 1: sample number
  # 2: temperature
  # 3: species name
  # 4: group = crustacean, mollusc, polychaete, or caprellid
  # 5-13: abundances at sieve sizes 8, 5.6, 4, 2.8, 2, 1.4, 1, 0.71, 0.5

edgarMethod=function(x) {
  # Create vector of mulitpliers representing estimated biomass for 1 individual
    # in each sieve size class (see above for sizes)
  multiples=
    outer(x$group=="Crustacean",
          c(37.007,14.659,5.807,2.300,0.911,0.361,0.143,0.058,0.023))+
    outer(x$group=="Mollusc",
          c(47.015,18.076,6.950,2.672,1.027,0.395,0.152,0.060,0.023))+
    outer(x$group=="Polychaete",
          c(27.959,11.780,4.963,2.091,0.881,0.371,0.156,0.067,0.028))+
    outer(x$group=="Caprellid",
          c(4.382,2.267,1.173,0.607,0.314,0.163,0.084,0.044,0.023))
  # Add additional columns and multiply abundances (in number of individuals)
    # by vectors above to convert abundance to biomass
  x[,14:22]=x[,5:13]*multiples
  # Rename the columns to identify which are the abudnances, and which are
    # are the estimated biomasses
  names(x)[14:22]=paste(names(x[,5:13]),"AFDM",sep="_")
  names(x)[5:13]=paste(names(x[,5:13]),"abund",sep="_")
  # Obtain the total abundance (in total number of individuals)
  x$total.abundance=apply(x[,5:13],1,sum,na.rm=T)
  # Obtain the total biomass (in mg AFDM)
  x$total.biomass.mg=apply(x[,14:22],1,sum,na.rm=T) 
  # Obtain the total rate of secondary production (based on allometric equations).
    # in mg AFM day-1
  x$total.secondprod.mg.d=(0.0049*((x$total.biomass*1000)^0.80)*(x[,2]^0.89))/10000
  # Return dataframe
  return(x) } 

### EXAMPLE ###

# edgarMethod( data.frame(sample=rep(1,4),temp=rep(25,4),
#               species=paste("sp",1:4,sep=""),
#               group=c("Crustacean","Mollusc","Polychaete","Caprellid"),
#               sieve8=rpois(4,1),sieve5.6=rpois(4,1),sieve4=rpois(4,1),
#               sieve2.8=rpois(4,1),sieve2=rpois(4,1),sieve1.4=rpois(4,1),
#               sieve1=rpois(4,1),sieve0.71=rpois(4,1),sieve0.5=rpois(4,1)) )

Created by Pretty R at inside-R.org

References:

Edgar, G.J. 1990. The use of the size structure of benthic macrofaunal communities to estimate faunal biomass and secondary production. Journal of Experimental Marine Biology and Ecology 137(3): 195-214.

6 thoughts on “Edgar equations in R

  1. rjabest says:

    Hey Edgar-Method-Insider! I have a question about the paper. Figure 1 (where he shows the fit line) is plotting logS = log(0.5), etc, and then the table claims the x variable should be (log(0.5) + log(0.71))/2, etc. I see your multipliers come from the latter. Do you have any insight into what was going on in the paper? What am I missing? Thanks!

    • Jon Lefcheck says:

      Ah, good catch Rebecca. This is because the animals in the 0.5 sieve are between 0.5-0.71 mm in size (0.71 being the sieve above them), and thus their estimated biomass is expressed as the average of the two!

      • rjabest says:

        I totally agree that makes sense and is adequately explained in the paper, I just don’t get why it isn’t shown that way in the figure. BUT, this little post of yours has convinced me I’m doing it the right way, so good enough. Thanks much for the post and reply!

      • Jon Lefcheck says:

        Ah because in the figure, the regression fit in Fig 1 treats sieve size as a continuous variable, whereas in reality, we sieve the critters in discrete bins (you can actually see the bins in the figure, tsk tsk). Thus, you end up needing to split the difference when you’re working with animals caught between two successive sieves. Hopefully that makes a bit more sense?

  2. rjabest says:

    I am really wasting your time and mine now, but….it’s just that Figure 1 is plotted strangely. Edgar used exactly the same binned data to make that equation that we use it to estimate, so the the x variable should be the same in both cases. In Figure 1, the x values are not what they should be, so the intercept is not what is claimed: it’s -0.8 instead of -1.0. Anyway…thanks again for the confirm I am using this as intended.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s