plotcp                 package:rpart                 R Documentation

_P_l_o_t _a _C_o_m_p_l_e_x_i_t_y _P_a_r_a_m_e_t_e_r _T_a_b_l_e _f_o_r _a_n _R_p_a_r_t _F_i_t

_D_e_s_c_r_i_p_t_i_o_n:

     Gives a visual representation of the cross-validation results in
     an  'rpart' object.

_U_s_a_g_e:

     plotcp(x, minline = TRUE, lty = 3, col = 1,
            upper = c("size", "splits", "none"), ...)

_A_r_g_u_m_e_n_t_s:

       x: an object of class 'rpart'  

 minline: whether a horizontal line is drawn 1SE above the minimum of
          the curve.  

     lty: line type for this line  

     col: colour for this line  

   upper: what is plotted on the top axis: the size of the tree (the
          number of leaves), the number of splits or nothing.  

     ...: additional plotting parameters  

_D_e_t_a_i_l_s:

     The set of possible cost-complexity prunings of a tree from a
     nested set. For the geometric means of the intervals of values of
     'cp' for which a pruning is optimal, a cross-validation has
     (usually) been done in the initial construction by 'rpart'. The
     'cptable' in the fit contains the mean and standard deviation of
     the errors in the cross-validated prediction against each of the
     geometric means, and these are plotted by this function. A good
     choice of 'cp' for pruning is often the leftmost value for which
     the mean lies below the horizontal line.

_V_a_l_u_e:

     None.

_S_i_d_e _E_f_f_e_c_t_s:

     A plot is produced on the current graphical device.

_S_e_e _A_l_s_o:

     'rpart',  'printcp',  'rpart.object'

