pls_permutation_by_groups | R Documentation |
Run a PLSR model permutation analysis stratified by selected "groups". Can be used to determine the optimal number of components or conduct a boostrap uncertainty analysis
pls_permutation_by_groups(
dataset = NULL,
targetVariable = NULL,
maxComps = 20,
iterations = 20,
prop = 0.7,
group_variables = NULL,
verbose = FALSE
)
dataset |
input full PLSR dataset. Usually just the calibration dataset |
targetVariable |
What object or variable to use as the Y (predictand) in the PLSR model? Usually the "inVar" variable set at the beginning of a PLS script |
maxComps |
maximum number of components to use for each PLSR fit |
iterations |
how many different permutations to run |
prop |
proportion of data to preserve for each permutation |
group_variables |
Character vector of the form c("var1", "var2"..."varn") providing the factors used for stratified sampling in the PLSR permutation analysis |
verbose |
Should the function report the current iteration status/progress to the terminal or run silently? TRUE/FALSE. Default FALSE |
output a list containing the PRESS and coef_array. output <- list(PRESS=press.out, coef_array=coefs)
asierrl, Shawn P. Serbin, Julien Lamour
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.