rs3                   package:gnlm                   R Documentation

_T_h_r_e_e-_f_a_c_t_o_r _B_o_x-_T_i_d_w_e_l_l _N_o_n_l_i_n_e_a_r _R_e_s_p_o_n_s_e _S_u_r_f_a_c_e _M_o_d_e_l_s

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

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

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

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

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

       y: Response variable

      x1: First covariate

      x2: Second covariate

      x3: Third covariate

   power: Initial estimates of the three power transformations

  weight: Weight vector

  family: glm family

 iterlim: Iteration limit

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

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

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

     J.K. Lindsey

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

     'lm', 'glm', 'gnlr', 'gnlr3', 'rs2'

_E_x_a_m_p_l_e_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)

