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, nrow(x$importance)),
                type=NULL, class=NULL, scale=TRUE, 
                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'.)

type, class, scale: arguments to be passed on to 'importance'

    main: plot title.

     ...: Other graphical parameters to be passed on to 'dotchart'.

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

     Invisibly, the importance of the variables that were plotted.

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

     Andy Liaw andy_liaw@merck.com

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

     'randomForest', 'importance'

_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)

