variable.selection        package:plsgenomics        R Documentation

_V_a_r_i_a_b_l_e _s_e_l_e_c_t_i_o_n _u_s_i_n_g _t_h_e _P_L_S _w_e_i_g_h_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     The function 'variable.selection'  performs variable selection for
     binary classification.

_U_s_a_g_e:

     variable.selection(X, Y, nvar=NULL)

_A_r_g_u_m_e_n_t_s:

       X: a (n x p) data matrix of predictors. X may be a matrix or a
          data frame. Each row corresponds to an observation and each
          column corresponds to a predictor variable.

       Y: a vector of length n giving the classes of the n
          observations.  The two classes must be coded as 1,2.

    nvar: the number of variables to be returned. If 'nvar=NULL', all
          the variables are returned.

_D_e_t_a_i_l_s:

     The function 'variable.selection' orders the variables according
     to  the absolute value of the weight defining the first PLS
     component. This ordering is equivalent to the ordering obtained
     with the  F-statistic and t-test with equal variances (Boulesteix,
     2004).

     For computational reasons, the function 'variable.selection' does
     not use  the pls algorithm, but the obtained ordering of the
     variables is exactly  equivalent to the ordering obtained using
     the PLS weights output by 'pls.regression'.

_V_a_l_u_e:

     A vector of length 'nvar' (or of length p if 'nvar=NULL')
     containing the indices of the variables to be selected.  The
     variables are ordered from the best to the worst variable.

_A_u_t_h_o_r(_s):

     Anne-Laure Boulesteix (<URL:
     http://www.statistik.lmu.de/~socher/>)

_R_e_f_e_r_e_n_c_e_s:

     A. L. Boulesteix (2004). PLS dimension reduction for
     classification with microarray data, Statistical Applications in
     Genetics and Molecular Biology *3*, Issue 1, Article 33.

     S. de Jong (1993). SIMPLS: an alternative approach to partial
     least squares  regression, Chemometrics Intell. Lab. Syst. *18*,
     251-263.

_S_e_e _A_l_s_o:

     'pls.regression'.

_E_x_a_m_p_l_e_s:

     # load plsgenomics library
     library(plsgenomics)

     # generate X and Y (4 observations and 3 variables)
     X<-matrix(c(4,3,3,4,1,0,6,7,3,5,5,9),4,3,byrow=FALSE)
     Y<-c(1,1,2,2)

     # select the 2 best variables
     variable.selection(X,Y,nvar=2)
     # order the 3 variables
     variable.selection(X,Y)

     # load the leukemia data 
     data(leukemia)

     # select the 50 best variables from the leukemia data
     variable.selection(leukemia$X,leukemia$Y,nvar=50)

