home *** CD-ROM | disk | FTP | other *** search
-
- _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
-
- ace(x, y, wt, mon, lin, cat, circ, delrsq)
-
- _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 variables
- are to be transformed by monotone transformations.
- Positive values in mon refer to columns of the x matrix
- and zero to the response variable.
-
- lin:
- an optional integer vector specifying which variables
- are to be transformed by linear transformations. Posi-
- tive values in lin refer to columns of the x matrix and
- zero to the response variable.
-
- cat:
- an optional integer vector specifying which variables
- 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 values 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 consecutive iterations
- (default 0.01).
-
- Value:
-
- 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 ace
-
- m:
- not used in this version of ace
-
- Description:
-
- Uses the alternating conditional expectations algo-
- rithm to find the transformations of y and x that max-
- imise the proportion of variation in y explained by x.
-
- Breiman and Friedman, Journal of the American Statist-
- ical Association (September, 1985) The R code is
- adapted from S code for avas() by Tibshirani, in the
- Statlib S archive; the FORTRAN is a double-precision
- version of FORTRAN code by Friedman and Spector in the
- Statlib general archive.
-
- _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)
- plot(a,ay) # view the response transformation
- plot(a,ax) # view the carrier transformation
- plot(ax,ay) # examine the linearity of the fitted model
-
-