

   FFiitt aa TThhrreeee--ffaaccttoorr BBooxx--TTiiddwweellll NNoonnlliinneeaarr RReessppoonnssee SSuurrffaaccee

        rs3(y, x1, x2, x3, power=c(1,1,1), weight=rep(1,length(y)),
             family=normal, iterlim=20)

   AArrgguummeennttss::

          y: Response variable

         x1: First covariate

         x2: Second covariate

         x3: Third covariate

      power: Initial estimates of the three power transforma-
             tions

     weight: Weight vector

     family: glm family

    iterlim: Iteration limit

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

        `rs3' fits a three-covariate power-transformed response
        surface by iterating the function, `glm'.

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

        A list of class, rs, is returned containing the model
        and the power estimates.

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

        J.K. Lindsey

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

        `lm', `glm', `gnlr', `gnlr3', `fmr', `rs2'.

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

        x1 <- rep(1:4,5)
        x2 <- rep(1:5,rep(4,5))
        x3 <- c(rep(1:3,6),1,2)
        y <- rpois(20,1+2*sqrt(x1)+3*log(x2)+1/x3+4*x1+log(x2)^2+1/x3^2+
             2*sqrt(x1)*log(x2)+sqrt(x1)/x3+log(x2)/x3)
        rs3(y, x1, x2, x3, family=poisson)

