earthworms                package:drc                R Documentation

_E_a_r_t_h_w_o_r_m _t_o_x_i_c_i_t_y _t_e_s_t

_D_e_s_c_r_i_p_t_i_o_n:

     The dataset is obtained from a toxicity test using earthworms, and
     it contains the number of earthworms  remaining in a container
     that is contaminated with a toxic substance (not disclosed) and
     not migrating to the neighbouring uncontaminated container).

_U_s_a_g_e:

     data(earthworms)

_F_o_r_m_a_t:

     A data frame with 35 observations on the following 3 variables.

     '_d_o_s_e' a numeric vector of dose values

     '_n_u_m_b_e_r' a numeric vector containing counts of remaining
          earthworms in the container

     '_t_o_t_a_l' a numeric vector containing total number of earthworms put
          in the containers

_D_e_t_a_i_l_s:

     At dose 0 around half of the earthworms is expected be in each of
     the two containers. Thus it is not  appropriate to fit an ordinary
     logistic regression with log(dose) as explanatory variable to
     these data as it implies an upper limit of 1 at dose 0 and in fact
     this model does not utilise the observations at dose 0 (see the
     example section below).

_S_o_u_r_c_e:

     The dataset is kindly provided by Nina Cedergreen, Faculty of Life
     Sciences, University of Copenhagen,  Denmark.

_E_x_a_m_p_l_e_s:

     ## Fitting a logistic regression model
     earthworms.m1 <- drm(number/total~dose, weights = total, data = earthworms,
     fct = LL.2(), type = "binomial")
     modelFit(earthworms.m1)  # a crude goodness-of-fit test

     ## Fitting an extended logistic regression model 
     ##  where the upper limit is estimated
     earthworms.m2 <- drm(number/total~dose, weights = total, data = earthworms,
     fct = LL.3(), type = "binomial")
     modelFit(earthworms.m2)  # goodness-of-fit test
     # improvement not visible in test!!!

     ## Comparing model1 and model2 
     ## (Can the first model be reduced to the second model?)
     anova(earthworms.m1, earthworms.m2)

