

SSfol {nls}                                  R Documentation

_F_i_r_s_t_-_o_r_d_e_r _C_o_m_p_a_r_t_m_e_n_t _M_o_d_e_l

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

     This `selfStart' model evaluates the first-order com-
     partment function and its gradient.  It has an `ini-
     tial' attribute that creates initial estimates of the
     parameters `lKe', `lKa', and `lCl'.

_U_s_a_g_e_:

     SSfol(Dose, input, lKe, lKa, lCl)

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

    Dose: a numeric value representing the initial dose.

   input: a numeric vector at which to evaluate the model.

     lKe: a numeric parameter representing the natural loga-
          rithm of the elimination rate constant.

     lKe: a numeric parameter representing the natural loga-
          rithm of the absorption rate constant.

     lCl: a numeric parameter representing the natural loga-
          rithm of the clearance.

_V_a_l_u_e_:

     a numeric vector of the same length as `input', which
     is the value of the expression `Dose * exp(lKe+lKa-lCl)
     * (exp(-exp(lKe)*input)-exp(-exp(lKa)*input)) /
     (exp(lKa)-exp(lKe))'.

     If all of the arguments `lKe', `lKa', and `lCl' are
     names of objects, the gradient matrix with respect to
     these names is attached as an attribute named `gradi-
     ent'.

_A_u_t_h_o_r_(_s_)_:

     Jose Pinheiro and Douglas Bates

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

     `nls', `selfStart'

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

     library( nls )
     data( Theoph )
     Theoph.1 <- Theoph[ Theoph$Subject == 1, ]
     SSfol( Theoph.1$Dose, Theoph.1$Time, -2.5, 0.5, -3 )  # response only
     lKe <- -2.5; lKa <- 0.5; lCl <- -3
     SSfol( Theoph.1$Dose, Theoph.1$Time, lKe, lKa, lCl ) # response and gradient
     getInitial(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph.1)
     ## Initial values are in fact the converged values
     fm1 <- nls(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph.1)
     summary(fm1)

