pls_permutation_by_groups: Run a PLSR model permutation analysis stratified by selected...

pls_permutation_by_groupsR 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

Description

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

Usage

pls_permutation_by_groups(
  dataset = NULL,
  targetVariable = NULL,
  maxComps = 20,
  iterations = 20,
  prop = 0.7,
  group_variables = NULL,
  verbose = FALSE
)

Arguments

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

Value

output a list containing the PRESS and coef_array. output <- list(PRESS=press.out, coef_array=coefs)

Author(s)

asierrl, Shawn P. Serbin, Julien Lamour


TESTgroup-BNL/PLSR_for_plant_trait_prediction documentation built on Feb. 15, 2025, 2:08 p.m.