mixdrc                  package:drc                  R Documentation

_F_i_t_t_i_n_g _m_u_l_t_i_p_l_e _d_o_s_e-_r_e_s_p_o_n_s_e _c_u_r_v_e_s _w_i_t_h _r_a_n_d_o_m _e_f_f_e_c_t_s

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

     'mixdrc' fits non-linear mixed models where random effects are
     assigned to some or all of the parameters.

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

     mixdrc(object, random, data, startVal)

_A_r_g_u_m_e_n_t_s:

  object: an object of class 'drc'.

  random: a character string specifying the random effects.
          Specification is as in 'nlme'.

    data: a data frame containing the variables in the model (not
          optional).

startVal: a numeric vector of initial parameter values for the fixed
          effects (optional).

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

     The function searches through a range of initial values in order
     to obtain convergence of the estimation procedure.

_V_a_l_u_e:

     An object of classes 'drc' and 'nlme'.

_N_o_t_e:

     This functionality will be completely revamped and extended during
     2009.

_A_u_t_h_o_r(_s):

     Christian Ritz

_S_e_e _A_l_s_o:

     Non-linear mixed models can be fitted using 'nlme'.

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

     ## First fitting a model without random effects
     ## Oops: ideally a Box-Cox transformation should be used
     spinach.m1 <- drm(SLOPE~DOSE, CURVE, data = spinach, fct = LL.4(),
     pmodels = data.frame(HERBICIDE, 1, 1, HERBICIDE))

     ## Then fitting the same model (the same fixed effects)
     ##  but with random effects (assigned to d)

     spinach.m2 <- mixdrc(spinach.m1, random="d~1|CURVE", data = spinach)
     compParm(spinach.m2, "e", "-")

     ## Fitting a model without random effects
     ##  but with a Box-Cox transformation

     spinach.m3 <- drm(SLOPE~DOSE, CURVE, data = spinach, fct = LL.4(),
     pmodels = data.frame(HERBICIDE, 1, 1, HERBICIDE))

     ## Then fitting the same model with random effects assigned to d

     spinach.m4 <- mixdrc(spinach.m3, random="d~1|CURVE", data = spinach)
     compParm(spinach.m4, "e", "-")

     ## Fitting a model without random effects, but fixing the c parameter at 0
     spinach.m5 <- drm(SLOPE~DOSE, CURVE, data = spinach, fct = LL.3(),
     pmodels = data.frame(HERBICIDE, 1, HERBICIDE))

     ## Fitting the corresponding mixed model with random effects on d
     spinach.m6 <- mixdrc(spinach.m5, random="d~1|CURVE", data = spinach)

