subsets                 package:car                 R Documentation

_P_l_o_t _O_u_t_p_u_t _f_r_o_m _r_e_g_s_u_b_s_e_t_s _F_u_n_c_t_i_o_n _i_n _l_e_a_p_s _p_a_c_k_a_g_e

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

     The `regsubsets' function in the `leaps' package finds
 optimal
     subsets of predictors. This function plots a measure of fit
 (see
     the `statistic' argument below) against subset size).

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


     subsets(object, ...)

     subsets.regsubsets(object, 
         names=abbreviate(object$xnames, minlength = abbrev), 
         abbrev=1, min.size=1, max.size=length(names), legend, 
         statistic=c("bic", "cp", "adjr2", "rsq", "rss"), 
         las=par('las'), cex.subsets=1, ...)

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

  object: a `regsubsets' object produced by the `regsubsets' function
          in the `leaps' package.

   names: a vector of (short) names for the predictors, excluding the
          regression intercept, if one is present; if missing, these
          are
 derived from the predictor names in `object'.

  abbrev: minimum number of characters to use in abbreviating predictor
          names.

min.size: minimum size subset to plot; default is 1.

max.size: maximum size subset to plot; default is number of predictors.

  legend: TRUE to plot a legend of predictor names; defaults to TRUE if
           abbreviations are computed for predictor names. The legend
          is placed on the
 plot interactively with the mouse.

statistic: statistic to plot for each predictor subset; one of: 
          `"bic"', Bayes Information Criterion; 
 `"cp"', Mallows\'s
          Cp;
 `"adjr2"', R^2 adjusted for degrees of freedom;
          `"rsq"', unadjusted R^2;
 `"rss"', residual sum of squares.

     las: if `0', ticks labels are drawn parallel to the
 axis; set to
          `1' for horizontal labels (see `par').

cex.subsets: can be used to change the relative size of the characters
          used to
 plot the regression subsets; default is `1'.

     ...: arguments to be passed down to 
 `subsets.regsubsets' and
          `plot'.

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

     `NULL'. This function is used for its side effect -
 to create a
     plot.

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

     John Fox

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

     `regsubsets'

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



     library(leaps)
     data(Ericksen)
     subsets(regsubsets(undercount ~ ., data=Ericksen))


