*3.1. Specification of the PLS Regression Model Using the Full Spectrum*

The PLS equation follows a standard regression (Equation (1)):

$$\mathfrak{g} = \beta\_1 \mathfrak{x}\_1 + \beta\_2 \mathfrak{x}\_2 + \dots + \beta\_k \mathfrak{x}\_k + \varepsilon \tag{1}$$

where the response variable *y*ˆ is the nutrient value, and the predictor variables *x*<sup>1</sup> to *xk* are the reflectance (SG) or derivative (FD) values for bands 1 to *k* (here, 277). β<sup>1</sup> to β*<sup>k</sup>* are the estimated weighted regression coefficients computed directly from the PLS loadings corresponding to the model with the optimal number of latent variables, and ε is the error vector. The optimal number of latent variables (NLV) is determined through a leave-one-out (LOO) cross-validation and assessed through the minimum root mean square error:

$$RMSE\_{CV} = \sqrt{\frac{\sum\_{i=1}^{n} \left(\hat{y}\_i^{\epsilon} - y\_i^{\epsilon}\right)^2}{n}} \tag{2}$$

where *y*ˆ*<sup>c</sup> <sup>i</sup>* represents the predicted response when the model is built without sample *<sup>i</sup>*, *<sup>y</sup><sup>c</sup> <sup>i</sup>* represents the measured nutrient value for sample *i*, and *n* represents the number of samples used in the calibration [46]. Twelve, standard PLS regressions were performed, each corresponding to a dataset in Table 1, and each including the full set of 277 bands (PLS-Full).

## *3.2. PLS Regression with Waveband Selection*

A modified form of PLS regression, known as the waveband selection (or iterative stepwise elimination) method, was developed to eliminate noisy and unhelpful predictors in hyperspectral studies [13,44]. Instead of including all 277 wavebands, the number is reduced iteratively [44] by dropping the least important wavebands (similar to stepwise linear regression). Waveband importance (*vk*) is determined as:

$$\upsilon\_k = \frac{|\beta\_k| s\_k}{\sum\_{k=1}^{K} |\beta\_k| s\_k} \tag{3}$$

where β*<sup>k</sup>* and *sk* are the regression coefficient and standard deviation corresponding to waveband *k*. The selection begins with all 277 wavebands, and the waveband contributing least to the model (lowest *vk*) is removed. The model (Equation (1)) is then re-run with 276 variables, and so on, until the maximum predictive capability is achieved [47]. A representation of the iterative processes to determine the maximum predictive capability is shown in Figure 5. This version of the model is hereafter referred to as PLS-Wave.

**Figure 5.** Representation of the iterative process to determine the number of wavebands via the waveband selection process. The number of wavebands is determined by the lowest RMSEcv value (dotted line), which in turn determines the coefficient of determination (solid line) using the given number of wavebands in the partial least square regression (PLS). Top figure is for the Savitsky–Golay filtered data. The bottom figure is for the first derivative.

#### *3.3. Predictive Ability of PLS Regression*

To test the predictive capabilities of the PLS-Full and PLS-Wave models, we implemented a bootstrapping procedure by dividing the data into calibration (65–75%) and validation (25–35%) sets replacing the data of these sets *n* = 1000 times (following [48,49]). After each separation, the models were calibrated (assessed through *RMSECV*) and then validated using root mean square error of prediction (*RMSEP*):

$$RMSE\_p = \sqrt{\frac{\sum\_{i=1}^{n} \left(\hat{y}\_i^v - y\_i^v\right)^2}{n}} \tag{4}$$

where *y*ˆ*<sup>v</sup> <sup>i</sup>* represents the predicted nutrient values, *<sup>y</sup><sup>v</sup> <sup>i</sup>* represents the measured nutrient values, and *n* represents the number of samples in the validation subset [46]. Mean coefficient of determination (*R*2), *R*<sup>2</sup> standard deviation (*R*<sup>2</sup> std.), and *RMSEP* standard deviation (*RMSEP* std) are also reported for the validation. PLS regressions were performed in Matlab v2016a (MathWorks, Sherborn, MA, USA).

#### *3.4. Replication across Environments*

To assess the replicability of the PLS-Full and PLS-Wave regression methodologies for predicting nutrient content across environments, we compared model performance between the US and ET using a difference of means (*t*-test) for each component–nutrient combination (e.g., grain–calcium, plant–calcium, etc.) between the two sites from the bootstrapped results. To compare the similarity of wavebands selected by the PLS-Wave model, the Jaccard index [50] was used to measure the overlap in selected wavebands compared to the total number of wavebands selected for each site (Equation (5)):

$$J(A,B) = \left| A \cap B \right| \left| A \cup B \right| \tag{5}$$

where *A* and *B* are the set of selected wavebands in the two locations, respectively. A Jaccard value of 1.0 indicates that the models for the two locations overlap completely in terms of the wavebands selected as important for prediction; 0 indicates the two locations share none of the same wavebands.
