

   FFiirrsstt--oorrddeerr CCoommppaarrttmmeenntt MMooddeell

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

   AArrgguummeenntts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.

   DDeessccrriippttiioonn::

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

   VVaalluuee::

        a numeric vector of the same length as `input'.  It 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, as opposed to expressions or explicit
        numerical values, the gradient matrix with respect to
        these names is attached as an attribute named `gradi-
        ent'.

   AAuutthhoorr((ss))::

        Jose Pinheiro and Douglas Bates

   SSeeee AAllssoo::

        `nls', `selfStart'

   EExxaammpplleess::

        library( lme )
        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

