Same as log_likelihood(), except negated and requiring lambda on log scale (used in combination with nlm(), to ensure that the optimization search doesn't stray into negative values of lambda).
.nll(log.lambda, ...)the negative log-likelihood of the data with the current parameter values
natural logarithm of incidence rate
Arguments passed on to log_likelihood
pop_dataa data.frame() with cross-sectional serology data
by antibody and age, and additional columns
antigen_isosCharacter vector listing one or more antigen isotypes.
Values must match pop_data.
curve_paramsa data.frame() containing MCMC samples of parameters
from the Bayesian posterior distribution of a longitudinal decay curve model.
The parameter columns must be named:
antigen_iso: a character() vector indicating antigen-isotype
combinations
iter: an integer() vector indicating MCMC sampling iterations
y0: baseline antibody level at $t=0$ ($y(t=0)$)
y1: antibody peak level (ELISA units)
t1: duration of infection
alpha: antibody decay rate
(1/days for the current longitudinal parameter sets)
r: shape factor of antibody decay
noise_paramsa data.frame() (or tibble::tibble())
containing the following variables,
specifying noise parameters for each antigen isotype:
antigen_iso: antigen isotype whose noise parameters are being specified
on each row
nu: biological noise
eps: measurement noise
y.low: lower limit of detection for the current antigen isotype
y.high: upper limit of detection for the current antigen isotype
verboselogical: if TRUE, print verbose log information to console