CVlm                  package:DAAG                  R Documentation

_C_r_o_s_s-_V_a_l_i_d_a_t_i_o_n _f_o_r _L_i_n_e_a_r _R_e_g_r_e_s_s_i_o_n

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

     This function gives internal and cross-validation measures of
     predictive accuracy for ordinary linear regression.  The data are 
     randomly assigned to a number of `folds'.   Each fold is removed,
     in turn, while the remaining data is used to re-fit the regression
     model and to predict at the deleted observations.

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

     CVlm(df = houseprices, form.lm = formula(sale.price ~ area), m=3, dots = 
     FALSE, seed=29, plotit=TRUE, printit=TRUE)

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

      df: a data frame

 form.lm: a formula object

       m: the number of folds

    dots: uses pch=16 for the plotting character

    seed: random number generator seed

  plotit: if TRUE, a plot is constructed on the active device

 printit: if TRUE, output is printed to the screen

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

     For each fold, a table listing

        : 

        : 

        : 

        : 

     the residuals

     ms = the overall mean square of prediction error

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

     J.H. Maindonald

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

     'lm'

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

     CVlm()

