Llin.method.counts: The Llin method for count data The Llin method, which is...

View source: R/fitting.R

Llin.method.countsR Documentation

The Llin method for count data The Llin method, which is plotting binned counts on log-linear axes and then fitting a regression, for count data.

Description

The Llin method for count data The Llin method, which is plotting binned counts on log-linear axes and then fitting a regression, for count data.

Usage

Llin.method.counts(valCounts, num.bins = NULL, binBreaks = NULL)

Arguments

valCounts

valCounts: data.frame (can be tbl_df) with columns bodyMass and Number (which is the count for each body mass). bodyMass can represent midpoints, say, of existing bins, or be the actual species-specific converted-to-bodyMass values. Number can be non-integer, which can arise from standardising, say, trawl data to be per hour.

num.bins

number of bins to be used, though this is only a suggestion since can get over-ridden by hist(). Need to specify num.bins OR binBreaks.

binBreaks

breaks for the bins to be used to bin the data and then fit the regression.

Value

list containing:

  • mids: midpoint of bins

  • log.counts: log(counts) in each bin

  • counts: counts in each bin

  • lm: results of the linear regression of log.counts ~ mids

  • slope: slope of the linear regression fit

  • breaks: bin breaks

  • confVals: 95\

  • stdError: standard error of the fitted slope

Author(s)

Andrew Edwards


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