Learn R Programming

mdatools (version 0.13.1)

crossval.regmodel: Cross-validation of a regression model

Description

Does cross-validation of a regression model

Usage

crossval.regmodel(obj, x, y, cv, cal.fun)

Value

object of class plsres with results of cross-validation

Arguments

obj

a regression model (object of class regmodel)

x

a matrix with x values (predictors from calibration set)

y

a matrix with y values (responses from calibration set)

cv

number of segments (if cv = 1, full cross-validation will be used)

cal.fun

reference to function for model calibration