negLL.PLB.counts | R Documentation |
Calculate the negative log-likelihood of the parameters b
, xmin
and xmax
given count data for the PLB model. Returns the negative log-likelihood.
Will be called by nlm()
or similar, but xmin
and xmax
will then be estimated
as the min of lowest bin and max of the largest, not numerically using
likelihood.
negLL.PLB.counts(
b,
x,
c,
K = length(c),
xmin = min(x),
xmax = max(x),
sumclogx = sum(c * log(x))
)
b |
value of |
x |
vector of length K corresponding to data values |
c |
vector of length |
K |
number of |
xmin |
minimum value of |
xmax |
maximum value of |
sumclogx |
|
For testing the MLEmid methods (using midpoints of bins), then
give xmin
and xmax
explicitly as the lowest and highest bin breaks
because the x
values correspond to bins. But if x
just represents
counts of discrete values then no need to specify xmin
and xmax
, they
will be automatically determined as min(x)
and max(x)
, respectively,
although it can be good to specify them to avoid repeated calculation.
negative log-likelihood of the parameters given the data
Andrew Edwards
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.