Skip to main content
ARS Home » Research » Publications at this Location » Publication #204347

Title: PLS Program and Documentation

Author
item Reeves Iii, James
item Delwiche, Stephen - Steve

Submitted to: Near Infrared Spectroscopy Journal
Publication Type: Other
Publication Acceptance Date: 12/17/2007
Publication Date: 1/31/2008
Citation: Reeves III, J.B., Delwiche, S.R. 2008. PLS program for discriminant analysis and documentation. http://www.impublications.com/nir/abstract/J16_0031.

Interpretive Summary: Spectroscopy uses light to determine the composition of materials or for classification. In order to use the information available, mathematical processing of the spectra is almost always required. One of the methods commonly used today is called Partial Least Squares (PLS). SAS is a commercial program used by many researchers for statistical analysis which has PLS, but not in a form readily suitable for the analysis of spectral data, especially for discriminant analysis. This program for discriminant analysis has been developed as a major modification of a previously published SAS program for quantitative analysis using PLS which is available at http://www.nirpublications.com/software/index.html. That program implemented a number of data pre-treatments commonly used to better extract the information of interest from the spectra. However, that program was designed to use a from of PLS not suitable for discriminant analysis. While the program code for the spectral pre-treatments remained essentially the same for both original programs, an update (Version II) and this version designed specifically for discriminant analysis, extensive changes were needed to other parts of the program in order to implement discriminant analysis. At the same time of the publication, Version II of the original program, several additional macros were added for viewing and printing of spectra and correlation plots. The code for these macros has also remained essentially unchanged. The program was tested on forage and grain samples and also allows for testing of multiple spectral pre-treatments in a one step fashion with summary of all results.

Technical Abstract: This program for discriminant analysis using SAS Partial Least Squares (PLS) has been developed as a major modification of a previously published SAS program for quantitative analysis using PLS which is available at http://www.nirpublications.com/software/index.html. That program implemented multiplicative scatter correction, derivatives and other data pre-treatments of spectral data for use with SAS. However, that program was designed to use in the form of PLS1 (Development of differing factors for each different analyte) and also, SAS PLS will not accept non-numeric variables as input data for either X or Y variables. While the program code for the spectral pre-treatments remained essentially the same for both original programs, an update (Version II) and this version designed specifically for discriminant analysis, extensive changes were needed to other parts of the program in order to implement discriminant analysis based on PLS2 (common set of factors for all variables being discriminated). At the same time of the publication, Version II of the original program, several additional macros were added for viewing and printing of spectra and correlation plots. The code for these macros has also remained essentially unchanged. The only change is these macros and in the others which remained essentially the same was to place a “FORCE” option on all file “APPEND” commands. This avoids problems do to the same variable having different name lengths for example.