## 5 Technique Comparison
### The Ordinary Least Squares Method  
LR is one of the simplest and most widely used statistical methods for modeling the relationship between a dependent variable and one or more independent variables. It assumes a linear relationship and minimizes the sum of squared residuals between the predicted and observed values using Ordinary Least Squares (OLS) estimation. However, LR may be limited when dealing with complex SPVSs because of the potential for overfitting and the inability to handle multicollinear data [28].  
In SPVS modeling, LR can be effective when the data consist of a small number of predictors that exhibit a clear linear relationship with the output variable, such as temperature and solar irradiance [22]. However, for more complex relationships between environmental variables and energy generation, LR tends to perform poorly due to its simplicity.  
The Multiple LR Model (MLRM) is widely applied to many types of datasets which are available for many problems and in various subjects of science that confront various researchers in modeling the data and then obtaining accurate predictions about the future of those variables. Thus, the goal of applying the MLRM to any data of any set of variables is to model the multilinear relationship between the explanatory (independent) variables and the response (dependent) variables.  
In fact, MLRM is an extension of the Simple Linear Regression Model (SLRM) that uses one of the best estimation methods--the Ordinary Least Squares (OLS) method--because it includes more than one explanatory variable. Despite the ease of applying the multiple regression model, and the importance of its results, MLRM assumes the existence of a certain or approximate linear relationship between the dependent and independent variables, but the independent variables must not be significantly related, nor should the variance of the residuals be constant or equal.  
The MLR model [29] is defined for \(n\) tuples by  
\[y_{i}=\beta_{0}+\sum_{j=1}^{p}\beta_{j}x_{ji}+\in_{i}, \tag{1}\]  
where, for \(i=n\) observations, \(y_{i}\) is the dependent variable; \(x_{j},\ j=1,\ 2,\ \ldots,\ p\) are the explanatory variables; \(\beta_{0}\) and \(\beta_{j}\) are the parameters of the model; and \(\in\) is the model error variable. It is worth noting that the OLS method of estimating the coefficients of the above MLRM, \(\beta_{0}\) and \(\beta_{j}\), \(j=1,\ 2,\ \ldots,\ p\), through diminutive the Sum of Residual (errors) Squares, is represented by the symbol (RSS). Note that the new formulation of RSS is equal to,  
\[RSS=\sum_{i=1}^{n}\left[y_{i}-\hat{y}\right]^{2}=\sum_{i=1}^{n}\left[y_{i}\ -\ \left(\hat{\beta}_{0}\ +\sum_{j=1}^{p}\hat{\beta}_{j}\ x_{ji}\right)\right]^{2}, \tag{2}\]  
where \(\hat{y}\), \(\hat{\beta}_{0}\), and \(\hat{\beta}_{j},j=1,2,\ldots,p\) are the estimators of \(y_{i}\), \(\beta_{0}\), and \(\beta_{j},j=1,2,\ldots,p\) by OLS.  
Then, the estimators of the parameters of MLRM based on the Lagrangian form is given by  
\[\hat{\beta}_{OLS}=argmin\sum_{i=1}^{n}\left[y_{i}-\left(\beta_{0}\ +\sum_{j=1}^{p}\beta_{j}\ x_{ji}\right)\right]^{2}, \tag{3}\]where _argmin_ stands for argument Min. It may be useful to give \(\hat{\beta}_{OLS}\) in the following matrix form:  
\[\hat{\beta}_{OLS}=(X^{T}\ X)^{-1}\ X^{T}\ Y, \tag{4}\]  
where \(X^{T}\) is the transpose of \(X\); \((X^{T}\ X)^{-1}\) is the inverse of \((X^{T}\ X)\). The matrix \(X^{T}\ X\) should not be singular.