ginigain             package:exactmaxsel             R Documentation

_C_o_m_p_u_t_a_t_i_o_n _o_f _t_h_e _G_i_n_i _g_a_i_n _f_r_o_m _a _2_x_2 _c_o_n_t_i_n_g_e_n_c_y _t_a_b_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     The function 'ginigain' computes the Gini gain (also denoted as
     impurity reduction) resulting by splitting into the left and the
     right nodes whose counts are given in the contingency table 'mat'.
     See Strobl et al. (2006) for a more precise definition.

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

     ginigain(mat)

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

     mat: a 2x2 matrix corresponding to a two-dimensional contingency
          table. The first row and the second row correspond to Y=0 and
          Y=1, respectively. The first column and the second column
          correspond to the left and right nodes, respectively.

_D_e_t_a_i_l_s:

     Note that, in contrast to the chi-square statistic, the Gini gain
     does not treat X and Y symmetrically.

_V_a_l_u_e:

     the (positive) value of the Gini gain.

_A_u_t_h_o_r(_s):

     Anne-Laure Boulesteix (<URL:
     http://www.ibe.med.uni-muenchen.de/organisation/mitarbeiter/020_professuren/boulesteix/>)

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

     L. Breiman, J.H. Friedman, R.A. Olshen and C.J. Stone (1984),
     Classification and Regression Trees, Wadsworth, Monterey, CA.

     C. Strobl, A.-L. Boulesteix and T. Augustin (2006), Unbiased split
     selection  for classification trees based on the Gini index,
     Computational Statistics and Data Analysis 52:483-501.

_S_e_e _A_l_s_o:

     'maxsel.test'.

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

     # load exactmaxsel library
     library(exactmaxsel)

     # Define matrix
     A<-matrix(c(15,20,22,12),2,2)

     # Compute Gini gain
     ginigain(A)

