DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


PerformCrossVal

Declaration: FrmPLS.PerformCrossVal (MinFact, MaxFact, SizeTestSet, NRep: integer): integer;
Performs the cross validation of the PLS model, starting with MinFact factors up to MaxFact. The parameter SizeTestSet specifies the size of the test set. Positive values define the number of samples in the test set, negative number specify the percentage of samples in the test set. The parameter NRep defines the number of repetitions carried out per cross validation step.

The function returns the following error codes:

 0 ... everything is OK, CVD done
-1 ... MinFact is less than 1 or exceeds MaxFact
-2 ... SizeTestSet must not be zero
-3 ... SizeTestSet is greater than 50% of the objects
-4 ... NRep is out of range (valid: 1...100)
-5 ... the target value is not a dichotomous variable (if PLS/DA)