cv                   package:ipred                   R Documentation

_C_r_o_s_s-_v_a_l_i_d_a_t_e_d _E_r_r_o_r _R_a_t_e _E_s_t_i_m_a_t_o_r_s.

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

     Those functions are low-level functions used by `errorest' and are
     normally not called by users.

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

     cv(y, formula, data, model, predict, k=10, random=TRUE, 
                 strat=FALSE,
                 predictions=NULL, getmodels=NULL, ...) 

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

       y: response variable, either of class `factor' (classification),
          `numeric' (regression) or `Surv' (survival).

 formula: a formula object.

    data: data frame of predictors and response described in `formula'.

   model: a function implementing the predictive model to be evaluated.
          The function `model' can either return an object representing
          a fitted model or a function with argument `newdata' which
          returns predicted values. In this case, the `predict'
          argument to `errorest' is ignored.

 predict: a function with arguments `object' and `newdata' only which
          predicts the status of the observations in `newdata' based on
          the fitted model in `object'.

       k: k-fold cross-validation.

  random: logical, indicates whether a random order or the given order
          of the data should be used for sample splitting or not,
          defaults to `TRUE'.

   strat: logical, stratified sampling or not, defaults to `FALSE'.

predictions: logical, return the prediction of each observation.

getmodels: logical, return a list of models for each fold.

     ...: additional arguments to `model'.

_D_e_t_a_i_l_s:

     See `errorest'.

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

     Torsten.Hothorn <Torsten.Hothorn@rzmail.uni-erlangen.de>

