Estimating equation for 4-parameter log-logistic dose-response model
Source:R/ee-pharma.R
ee_loglogistic.RdImplements the 4-parameter log-logistic model: $$R_i = \theta_0 + \frac{\theta_m - \theta_0}{1 + \exp[\theta_s (\log D_i - \log \theta_{50})]}$$
See also
ee_loglogistic_ed() for the effective dose at a given level, which
is stacked with this equation to give it a sandwich standard error.
Examples
# Four-parameter log-logistic dose-response for the ryegrass data.
psi <- function(theta) {
ee_loglogistic(theta, dose = inderjit$dose, response = inderjit$response)
}
# The default rootSolve solver does not converge here, so nleqslv is used.
m <- m_estimate(
stacked_equations = psi,
init = c(0.2, 8, 2, 1),
solver = "nleqslv"
)
# Lower limit, upper limit, ED50, and steepness
coef(m)
#> lower upper ed50 steepness
#> 0.481410 7.792962 3.057955 2.982229