varImpPlot           package:randomForest           R Documentation

_V_a_r_i_a_b_l_e _I_m_p_o_r_t_a_n_c_e _P_l_o_t

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

     Dotchart of variable importance as measured by a Random Forest

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

     varImpPlot(x, sort=TRUE, n.var=min(30, if(is.null(dim(x$importance)))
                length(x$importance) else nrow(x$importance)),
                class = NULL, scale=TRUE, xlab="Importance", ylab="",
                main=deparse(substitute(x)), ...) 

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

       x: An object of class 'randomForest'.

    sort: Should the variables be sorted in decreasing order of
          importance?

   n.var: How many variables to show? (Ignored if 'sort=FALSE'.)

   class: For classification data, an integer or string indicating the
          class for which variable importance is seeked.

   scale: For permutation-based measures, should the measures be
          divided by their ``standard errors''?

    xlab: label for the x-axis.

    ylab: label for the y-axis.

    main: plot title.

     ...: Other graphical parameters.

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

     Invisibly, the importance of the variables.

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

     Andy Liaw andy_liaw@merck.com

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

     'randomForest'

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

     set.seed(4543)
     data(mtcars)
     mtcars.rf <- randomForest(mpg ~ ., data=mtcars, ntree=1000, keep.forest=FALSE,
                               importance=TRUE)
     varImpPlot(mtcars.rf)

