negLL.PLB.binned: Calculate negative log-likelihood for the bounded power-law...

View source: R/likelihood.R

negLL.PLB.binnedR Documentation

Calculate negative log-likelihood for the bounded power-law distribution given binned data

Description

Calculates the negative log-likelihood of the parameters b, xmin and xmax given binned data for the PLB model. Returns the negative log-likelihood. Will be called by nlm() or similar, but xmin and xmax will just be estimated as the minimum of lowest bin and maximum of the largest bin, respectively, (since they are the MLEs), no need to do numerically. Specifically this is the negative of the log-likelihood function given in (A.70) of the MEE paper and (S.27) of the MEPS paper, where the latter fixed a minor error in (A.75) of the MEE paper.

Usage

negLL.PLB.binned(b, w, d, J = length(d), xmin = min(w), xmax = max(w))

Arguments

b

value of b for which to calculate the negative log-likelihood

w

vector of length J+1 giving the bin breaks ⁠w_1, w_2, ..., w_{J+1}⁠

d

vector of length J giving the count in each bin; must have ⁠d_1, d_J > 0⁠

J

number of bins (length of d)

xmin

minimum value of bins, as an input to avoid repeatedly calculating

xmax

maximum value of bins, as an input to avoid repeatedly calculating

Value

negative log-likelihood of the parameters given the data

Author(s)

Andrew Edwards


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