plantphys / spectratrait

A tutorial R package for illustrating how to fit, evaluate, and report spectra-trait PLSR models. The package provides functions to enhance the base functionality of the R pls package, identify an optimal number of PLSR components, standardize model validation, and vignette examples that utilize datasets sourced from EcoSIS (ecosis.org)
GNU General Public License v3.0
11 stars 9 forks source link

Minor bugfix to address R2 error in the examples #82

Closed serbinsh closed 3 years ago

serbinsh commented 3 years ago

Fixes the incorrect reporting of R2 values due to displaying the R2 for 1-less component in the cal/val plot than actually selected. This was a result of not accounting for the intercept in the model. This fixes the bug reported in #81