

avas(acepack)                                R Documentation

_A_d_d_i_t_i_v_i_t_y _a_n_d _v_a_r_i_a_n_c_e _s_t_a_b_i_l_i_z_a_t_i_o_n _f_o_r _r_e_g_r_e_s_s_i_o_n

_U_s_a_g_e_:

     avas(x, y, wt, mon, lin, cat, circ, delrsq,yspan)

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

       x: a matrix containing the independent variables.

       y: a vector containing the response variable.

      wt: an optional vector of weights.

     mon: an optional integer vector specifying which vari-
          ables are to be transformed by monotone transfor-
          mations.  Positive values in `mon' refer to
          columns of the `x' matrix and zero to the response
          variable.

     lin: an optional integer vector specifying which vari-
          ables are to be transformed by linear transforma-
          tions.  Positive values in `lin' refer to columns
          of the `x' matrix and zero to the response vari-
          able.

     cat: an optional integer vector specifying which vari-
          ables assume categorical values.  Positive values
          in `cat' refer to columns of the `x' matrix and
          zero to the response variable.

    circ: an integer vector specifying which variables
          assume circular (periodic) values.  Positive val-
          ues in `circ' refer to columns of the `x' matrix
          and zero to the response variable.

  delrsq: termination threshold.  Iteration stops when R-
          squared changes by less than `delrsq' in 3 consec-
          utive iterations (default 0.01).

   yspan: Optional window size parameter for smoothing the
          variance.  Range is [0,1].  Default is 0 (cross
          validated choice). .5 is a reasonable alternative
          to try.

_V_a_l_u_e_:

     A structure with the following components:

       x: the input x matrix.

       y: the input y vector.

      tx: the transformed x values.

      ty: the transformed y values.

     rsq: the multiple R-squared value for the transformed
          values.

       l: not used in this version of avas

       m: not used in this version of avas

   yspan: span used for smoothing the variance

   iters: iteration number and rsq for that iteration

  niters: number of iterations used

_R_e_f_e_r_e_n_c_e_s_:

     Rob Tibshirani (1987), ``Estimating optimal transforma-
     tions for regression''.  Journal of the American Sta-
     tistical Association 83, 394ff.

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

     TWOPI <- 8*atan(1)
     x <- runif(200,0,TWOPI)
     y <- exp(sin(x)+rnorm(200)/2)
     a <- avas(x,y)
     par(mfrow=c(3,1))
     plot(a$y,a$ty)  # view the response transformation
     plot(a$x,a$tx)  # view the carrier transformation
     plot(a$tx,a$ty) # examine the linearity of the fitted model

