meanvar.rpart             package:rpart             R Documentation

_M_e_a_n-_V_a_r_i_a_n_c_e _P_l_o_t _f_o_r _a_n _R_p_a_r_t _O_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     Creates a plot on the current graphics device of the deviance of
     the  node divided by the number of observations at the node.  Also
     returns  the node number.

_U_s_a_g_e:

     meanvar(tree, ...)

     ## S3 method for class 'rpart':
     meanvar(tree, xlab="ave(y)", ylab="ave(deviance)", ...)

_A_r_g_u_m_e_n_t_s:

    tree: fitted model object of class 'rpart'.  This is asumed to be
          the result  of some function that produces an object with the
          same named  components as that returned by the 'rpart'
          function.  

    xlab: x-axis label for the plot.  

    ylab: y-axis label for the plot.  

     ...: additional graphical parameters may be supplied as arguments
          to this function.  

_V_a_l_u_e:

     an invisible list containing the following vectors is returned. 

       x: fitted value at terminal nodes ('yval').  

       y: deviance of node divided by number of observations at node.  

   label: node number.  

_S_i_d_e _E_f_f_e_c_t_s:

     a plot is put on the current graphics device.

_S_e_e _A_l_s_o:

     'plot.rpart'.

_E_x_a_m_p_l_e_s:

     z.auto <- rpart(Mileage ~ Weight, car.test.frame)
     meanvar(z.auto, log='xy')

