LBmizbinsFun: Calculate the bin breaks for the LBmiz method

View source: R/fitting.R

LBmizbinsFunR Documentation

Calculate the bin breaks for the LBmiz method

Description

Calculate the bin breaks for the LBmiz (log binning as done by the package mizer), given xmin and xmax (min and max of data) and the number of bins, k. To be minimised by nlm() to calculate beta.

Usage

LBmizbinsFun(beta, xmin, xmax, k)

Arguments

beta

to be calculated, log10(beta) is the constant binwidth on log10 scale. beta is solution to

0 = beta^(k-2) * (2 * beta-1) - xmax/xmin

  = 2 * beta^(k-1) - beta^(k-2) - xmax/xmin
xmin

minimum of data (lower bound of lowest bin)

xmax

maximum of data (upper bound of highest bin)

k

number of bins

Value

value to be minimised by nlm()

Author(s)

Andrew Edwards


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