Learn R Programming

doBy (version 3.9)

dose.LD50: Calculate LD50

Description

Calculate the LD50 (the dose at which 50 pct of the subjects die) for a model of the form logit(p)=beta1 x1 + ... + betap xp + gamma d where none of the explanatory variables x1 ... xp contains the dose d.

Usage

dose.LD50(x, lambda)

Arguments

x
A glm object (for logistic regression)
lambda
A vector of the same length as the number of parameters in x.

Value

  • A data frame

Details

lambda contains an NA at the entry corresponding to dose d. The other entries of lambda must be the values of the covariates x1 ... xp at which the ld50 is to be calculated.

Examples

Run this code
data(budworm)
m1 <- glm(ndead/20 ~ sex + log(dose), data=budworm, weight=ntotal, family=binomial)
coef(m1)

dose.LD50(m1,c(1,1,NA))
dose.LD50(m1,c(1,0,NA))

Run the code above in your browser using DataLab