validationplot              package:pls              R Documentation

_V_a_l_i_d_a_t_i_o_n _P_l_o_t_s

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

     Functions to plot validation statistics, such as RMSEP or R2, as a
     function of the number of components.

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

     validationplot(object, val.type = c("RMSEP", "MSEP", "R2"), estimate,
                    newdata, comps, intercept, ...)
     ## S3 method for class 'mvrVal':
     plot(x, nCols, nRows, type = "l", ...)

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

  object: an 'mvr' object.

val.type: character.  What type of validation statistic to plot.

estimate: character.  Which estimates of the statistic to calculate. 
          See 'RMSEP'.

 newdata: data frame.  Optional new data used to calculate statistic.

   comps: integer vector.  The model sizes to compute the statistic
          for.  See 'RMSEP'.

intercept: logical.  Whether estimates for a model with zero components
          should be calculated as well.

       x: an 'mvrVal' object.  Usually the result of a 'RMSEP', 'MSEP'
          or 'R2' call.

nCols, nRows: integers.  The number of coloumns and rows the plots will
          be laid out in.  If not specified, 'plot.mvrVal' tries to be
          intelligent.

    type: character.  What type of plots to create.  Defaults to '"l"'
          (lines).

     ...: Further arguments sent to underlying plot functions.

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

     'validationplot' calls the proper validation function (currently
     'MSEP', 'RMSEP' or 'R2') and plots the results with 'plot.mvrVal'.
      'validationplot' can be called through the 'mvr' plot method, by
     specifying 'plottype = "validation"'.

     'plot.mvrVal' creates one plot for each response variable in the
     model, laid out in a rectangle.

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

     The functions do not return any values.

_N_o_t_e:

     The handling of optional arguments (...) between these functions
     is a bit rough, and not thoroughly tested.

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

     Ron Wehrens and Bjrn-Helge Mevik

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

     'mvr', 'plot.mvr', 'RMSEP', 'MSEP', 'R2'

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

     data(sensory)
     mod <- plsr(Panel ~ Quality, data = sensory, CV = TRUE, length.seg = 1)
     ## Not run: 
     ## These three are equivalent:
     validationplot(mod, estimate = "all")
     plot(mod, "validation", estimate = "all")
     plot(RMSEP(mod, estimate = "all"))
     ## Plot R2:
     plot(mod, "validation", val.type = "R2")
     ## End(Not run)

