Groups are exposed at several doses and the number responding at each is recorded; a tolerance-distribution model is fitted and inverted at the 50 per cent point.
Usage
morie_ld50(
dose,
n_dead,
n_total,
link = c("probit", "logit"),
level = 0.5,
alpha = 0.05,
log_dose = TRUE
)Value
A list with estimate, ci_lower, ci_upper, slope,
fieller_g, bounded, deviance, heterogeneity_factor,
heterogeneity_p, warnings.
Details
Doses are logged by default because the tolerance distribution is assumed SYMMETRIC on whatever scale the model is linear in, and tolerances are right-skewed on the natural scale. Fitting on the natural scale is not merely less convenient, it fits a different and usually wrong model.
Heterogeneity is tested by the chi-square tail, not by whether the deviance-to-df ratio exceeds 1. A factor above 1 means nothing on its own: the deviance has expectation df, so over 400 correctly specified replications it averaged 0.69 and still exceeded 1 in 20.5 per cent of them. The tail test is conservative on assays with saturated dose groups, since a group fitted within 1e-5 of 0 or 1 contributes no deviance while still spending a degree of freedom.
Examples
morie_ld50(dose = c(1, 2, 3, 4, 5, 6, 7, 8), n_dead = c(1, 2, 3, 4, 5, 6, 7, 8),
n_total = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 0
#>
#> $ed_log
#> [1] -6595459
#>
#> $ci_lower
#> [1] NA
#>
#> $ci_upper
#> [1] NA
#>
#> $ci_lower_log
#> [1] -Inf
#>
#> $ci_upper_log
#> [1] Inf
#>
#> $se_log
#> [1] 1.999348e+16
#>
#> $intercept
#> [1] 7.71124
#>
#> $slope
#> [1] 1.169174e-06
#>
#> $cov
#> x
#> 36840871 -20685443
#> x -20685443 12561595
#>
#> $fitted
#> [1] 1 1 1 1 1 1 1 1
#>
#> $fieller_g
#> [1] 3.530064e+19
#>
#> $bounded
#> [1] FALSE
#>
#> $deviance
#> [1] 7.20064e-11
#>
#> $df_residual
#> [1] 6
#>
#> $heterogeneity_factor
#> [1] 1.200107e-11
#>
#> $heterogeneity_p
#> [1] 1
#>
#> $link
#> [1] "probit"
#>
#> $converged
#> [1] FALSE
#>
#> $level
#> [1] 0.5
#>
#> $n_groups
#> [1] 8
#>
#> $n
#> [1] 36
#>
#> $warnings
#> [1] "Fisher scoring did not converge. The estimate and its interval should not be used."
#> [2] "Fieller's g = 3.53e+19 is at or above 1, so the slope is not distinguishable from zero at this level and the interval is unbounded. The data do not bound the median dose."
#> [3] "One or more groups responded at 0 or 100 per cent. These carry little information about the slope and can make the fit unstable."
#>
#> $method
#> [1] "Median lethal dose by probit/logit with Fieller limits"
#>
