## Fitting model with lower limit equal 0
model1 <- multdrc(ryegrass, fct=LL.3())
summary(model1)
## Fitting binomial response
## with non-zero control response
## Example dataset from Finney (1971) - example 19
logdose <- c(2.17, 2,1.68,1.08,-Inf,1.79,1.66,1.49,1.17,0.57)
n <- c(142,127,128,126,129,125,117,127,51,132)
r <- c(142,126,115,58,21,125,115,114,40,37)
treatment <- factor(c("w213","w213","w213","w213",
"control","w214","w214","w214","w214","w214"))
finney_ex19 <- data.frame(logdose, n, r, treatment)
## Fitting model where the lower limit is estimated
model2 <- multdrc(r/n~logdose, treatment, weights=n, data=finney_ex19,
logDose=10, fct=LL.3u(), type="binomial",
collapse=data.frame(treatment, 1, treatment))
summary(model2)
anova(model2)
plot(model2, conLevel=-1, ylim=c(0.1, 1.3))
abline(h=1, lty=2)
rm(model1, model2, n, r, treatment, finney_ex19)
Run the code above in your browser using DataLab