## 2 Materials and Methods
### Statistical Method  
When working with univariate linear calibrations, ISO 11843-2 [37] and the International Union of Pure and Applied Chemistry (IUPAC) [38] defined a procedure to determine the decision limit and the capability of detection of an analytical method, evaluating the probabilities of false positives and false negatives. Nevertheless, when a multivariate calibration is used, as mentioned in Section 1, this methodology has to be generalized because these documents only refer to univariate calibrations. The decision limits and the detection capabilities are always calculated using a hypothesis test obtained from the calibration model whether it is univariate or multivariate. In the following sections, the main aspects of this generalization for multivariate signals are explained (given that we are working with multivariate signals), both for the capability of detection and the capability of discrimination, and then, the global procedure followed in this work is summarized for PLS models with NIR signals. 2.1 Decision Limit and Capability of Detection at \(x_{0}=0\) or for a Permitted Limit, \(x_{0}=\) PL with Multivariate Signals  
NIR spectra combined with PLS regression can be used for the control of maximum permitted limits based on official regulations or the maximum and/or minimum limits in \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Matrix** & **Analyte** & **Reference** & **N * & **Sample** & **Spectral** & **Final Data** & **Data Matrix of the** \\  & & **Method** & **Replicates** & **Replicates** & **Matrix** & **Prediction Set** \\ \hline \multirow{2}{*}{Butter} & Fat (\%) (\(w\)/\(w\)) & NMR & \multirow{2}{*}{11} & \multirow{2}{*}{2} & \multirow{2}{*}{3} & \multirow{2}{*}{66 \(\times\) 125} & \multirow{2}{*}{24 \(\times\) 125} \\  & Salt (\%) (\(w\)/\(w\)) & Atomic & & & & & \\  & & absorption & & & & & \\ \hline \multirow{2}{*}{Flour} & Protein (\%) & Kjeldahl & \multirow{2}{*}{36} & \multirow{2}{*}{3} & \multirow{2}{*}{3} & \multirow{2}{*}{3 or 6} & \multirow{2}{*}{504 \(\times\) 125} & \multirow{2}{*}{-} \\  & (\(w\)/\(w\)) & method & & & & & \\ \hline \multirow{2}{*}{Milk} & Fat (\%) (\(w\)/\(w\)) & FTIR & \multirow{2}{*}{38} & \multirow{2}{*}{1 or 2} & \multirow{2}{*}{3} & \multirow{2}{*}{195 \(\times\) 125} & \multirow{2}{*}{52 \(\times\) 125} \\  & Protein (\%) & FTIR & & & & & \\  & (\(w\)/\(w\)) & & & & & & \\ \hline \multirow{2}{*}{Yogurt} & Fat (\%) (\(w\)/\(w\)) & Gravimetry & \multirow{2}{*}{19} & \multirow{2}{*}{2 or 4} & \multirow{2}{*}{3} & \multirow{2}{*}{144 \(\times\) 125} & \multirow{2}{*}{24 \(\times\) 125} \\  & Protein (\%) (\(w\)/\(w\)) & Kjeldahl & & & & & \\  & (\(w\)/\(w\)) & method & & & & \\ \hline \multirow{2}{*}{Olive oil} & Refined olive & \multirow{2}{*}{**} & \multirow{2}{*}{14} & \multirow{2}{*}{1 or 2} & \multirow{2}{*}{3} & \multirow{2}{*}{81 \(\times\) 125} & \multirow{2}{*}{18 \(\times\) 125} \\  & oil (\%) (\(v\)/\(v\)) & & & & & \\ \hline \multirow{2}{*}{Olives} & Both & \multirow{2}{*}{GC-MS-MS (mg kg\({}^{-1}\))} & \multirow{2}{*}{40} & \multirow{2}{*}{1} & \multirow{2}{*}{***} & \multirow{2}{*}{40 \(\times\) 125} & \multirow{2}{*}{-} \\  & & & & & & \\ \hline \hline \end{tabular}  
* N: number of samples; ** the mixtures were prepared, knowing the true concentration; *** 8 averaged spectra.  
\end{table} 
Table 1: Reference method for each food matrix and each analyte, number of samples, data collection summary, and data matrix size. tentionally established to guarantee food quality. Regarding that, new figures of merit, CD\(\alpha\) and CD\(\beta\) had to be defined and evaluated, which are analogous to CC\(\alpha\) and CC\(\beta\)[37; 38]. In order to formalize the notation, the definitions given by (EU) 2021/808 regulation [39] referring to a permitted limit (PL) were used. PL can be defined as the maximum residue limit, maximum level, or other maximum tolerance for substances established in any normative or regulation.