home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / acepack / ace next >
Encoding:
Text File  |  1997-09-13  |  2.6 KB  |  94 lines

  1.     
  2.     _a_c_e: _A_l_t_e_r_n_a_t_i_n_g _C_o_n_d_i_t_i_o_n_a_l _E_x_p_e_c_t_a_t_i_o_n_s
  3.     
  4.          ace(x, y, wt, mon, lin, cat, circ, delrsq)
  5.     
  6.     _A_r_g_u_m_e_n_t_s:
  7.     
  8.                 x:
  9.          a matrix containing the independent variables.
  10.     
  11.                 y:
  12.          a vector containing the response variable.
  13.     
  14.                wt:
  15.          an optional vector of weights.
  16.     
  17.               mon:
  18.          an optional integer vector specifying which variables
  19.          are to be transformed by monotone transformations.
  20.          Positive values in mon refer to columns of the x matrix
  21.          and zero to the response variable.
  22.     
  23.               lin:
  24.          an optional integer vector specifying which variables
  25.          are to be transformed by linear transformations.  Posi-
  26.          tive values in lin refer to columns of the x matrix and
  27.          zero to the response variable.
  28.     
  29.               cat:
  30.          an optional integer vector specifying which variables
  31.          assume categorical values.  Positive values in cat
  32.          refer to columns of the x matrix and zero to the
  33.          response variable.
  34.     
  35.              circ:
  36.          an integer vector specifying which variables assume
  37.          circular (periodic) values.  Positive values in circ
  38.          refer to columns of the x matrix and zero to the
  39.          response variable.
  40.     
  41.            delrsq:
  42.          termination threshold.  Iteration stops when R-squared
  43.          changes by less than delrsq in 3 consecutive iterations
  44.          (default 0.01).
  45.     
  46.          Value:
  47.     
  48.          structure with the following components:
  49.     
  50.            x:
  51.     the input x matrix.
  52.     
  53.            y:
  54.     the input y vector.
  55.     
  56.           tx:
  57.     the transformed x values.
  58.     
  59.           ty:
  60.     the transformed y values.
  61.     
  62.          rsq:
  63.     the multiple R-squared value for the transformed values.
  64.     
  65.            l:
  66.     not used in this version of ace
  67.     
  68.            m:
  69.     not used in this version of ace
  70.     
  71.          Description:
  72.     
  73.           Uses the alternating conditional expectations algo-
  74.          rithm to find the transformations of y and x that max-
  75.          imise the proportion of variation in y explained by x.
  76.     
  77.           Breiman and Friedman, Journal of the American Statist-
  78.          ical Association (September, 1985) The R code is
  79.          adapted from S code for avas() by Tibshirani, in the
  80.          Statlib S archive; the FORTRAN is a double-precision
  81.          version of FORTRAN code by Friedman and Spector in the
  82.          Statlib general archive.
  83.     
  84.     _E_x_a_m_p_l_e_s:
  85.     
  86.          TWOPI <- 8*atan(1)
  87.          x <- runif(200,0,TWOPI)
  88.          y <- exp(sin(x)+rnorm(200)/2)
  89.          a <- avas(x,y)
  90.          plot(a,ay)  # view the response transformation
  91.          plot(a,ax)  # view the carrier transformation
  92.          plot(ax,ay) # examine the linearity of the fitted model
  93.     
  94.