SSfol                 package:stats                 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 compartment
     function and its gradient.  It has an 'initial' 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 logarithm of the
          elimination rate constant.

     lKa: a numeric parameter representing the natural logarithm of the
          absorption rate constant.

     lCl: a numeric parameter representing the natural logarithm 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 'gradient'.

_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:

     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)

