Negative log-likelihood for Tobit half-life regression
Source:R/half.life.R
fit_half_life_tobit_LL.RdHelper function used by fit_half_life_tobit() via stats::optim().
For observations above the LLOQ, the normal density contributes to the
likelihood. For censored (BLQ) observations, the normal CDF up to the
LLOQ contributes.
Arguments
- par
A 3-element numeric vector:
c(log_c0, lambda_z, log_resid_error)- log_conc
Natural log of observed concentration (may be
-Inffor BLQ; those values are not used whenmask_blqisTRUE)- time
Numeric time vector
- mask_blq
Logical vector;
TRUEwhere the observation is below the LLOQ- log_lloq
Natural log of the lower limit of quantification