rs2                   package:gnlm                   R Documentation

_T_w_o-_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:

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

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

     rs2(y, x1, x2, power=c(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

   power: Initial estimates of the two 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', 'rs3'

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

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

