Calculate LD50

R doBy

dose.LD50(doBy)R Documentation

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.

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.

Value

A data frame

Author(s)

Søren Højsgaard

Examples

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))

[Package doBy version 0.0-4 Index]