Learn R Programming

drc (version 1.2-0)

earthworms: Earthworms

Description

Dataset obtained from a toxicity test using earthworms, counting the number of earthworms staying in the toxic earth container (not migrating to the neighbouring container of clean earth).

Usage

data(earthworms)

Arguments

source

The dataset is kindly provided by Nina Cedergreen.

Details

At dose 0 around half of the earthworms wil be in each of the two containers. Thus it is not appropriate to this an ordinary logistic regression (with upper limit 1).

Examples

Run this code
## Fitting a logistic regression model
model1 <- multdrc(number/total~dose, weights=total, data=earthworms,
fct=l2(), type="binomial")
anova(model1)  # testing againsts more general one-way model

## Fitting an extended logistic regression model 
##  where the upper limit is estimated
model2 <- multdrc(number/total~dose, weights=total, data=earthworms,
fct=l3(), type="binomial")
anova(model2)  # "goodness-of-fit test"

## Comparing model1 and model2 (can model2 be reduced to model1?)
anova(model1, model2, test="Chisq")

rm(model1, model2)

Run the code above in your browser using DataLab