eightMethods: Compute size-spectra exponents for a dataset using all eight...

View source: R/fitting.R

eightMethodsR Documentation

Compute size-spectra exponents for a dataset using all eight methods - deprecated, see eightMethods.count()

Description

Originally developed and called in nSea15analysis.Snw, which was modified from what was in fitting2.r. May be specific to the IBTS data set, only for one year and I think subsumed in eightMethods.count()

Usage

eightMethods(
  oneYear = 1980,
  dataForYear = dplyr::filter(data, Year == oneYear),
  figName = "eightMethods"
)

Arguments

oneYear

the year of data to use, from that in the multiple years contained in dataForYear.

dataForYear

local data frame that has a unique row for every combination of Year, SpecCode and LngtClass, with columns:

  • Number: number of observed individuals of that species in that length class in that year

  • bodyMass: body mass representative of such an individual, as calculated previously by LWa * LngtClass ^ LWb.

figName

figure name, will get appended by -Year for each year, to create a .png file for each year.

Value

data frame with one row for each method, with columns:

  • Year

  • Method

  • b: estimate of b from that method

  • confMin: lower end of 95\

  • confMax: upper end of 95\

Also saves a .png figure called paste(figName, "-", oneYear, ".png"), of the fits for each of the eight methods.

Author(s)

Andrew Edwards


andrew-edwards/sizeSpectra documentation built on June 28, 2023, 7:09 p.m.