## 4 Materials and Methods
### Modeling Methods
The accuracy of a logistic regression model can be evaluated by determining accuracy, sensitivity, and precision, which are key metrics for assessing the performance of a classification model. Another method is to use the ROC curve (Receiver Operating Characteristic Curve), specifically calculating the AUC (Area Under the ROC Curve) [45]. When using these metrics, such as accuracy, sensitivity, and precision, it is necessary to define the so-called cutoff point, which represents the value of the studied variable that divides the dataset into two groups. In the first group, the phenomenon occurs, while in the second group, it does not. For this purpose, a certain fixed value \(\pi_{0}\) is selected from the range [0,1]. For that selected value, called the so-called cut-off point, the following classification is made: if the predicted value \(\hat{\pi}(\mathrm{x})=\hat{P}(\mathrm{Y}=1\ket{x})>\pi_{0}\), it is assumed that the event occurred (\(\hat{y}=1\)), otherwise \(\hat{\pi}(\mathrm{x})\leq\pi_{0}\)) it is assumed that the event did not occur (\(\hat{y}=0\)) [48]. Accuracy (ACC), can be represented by the following relationship (6):  
\[\mathrm{ACC}=\frac{\mathrm{TP}+\mathrm{TN}}{\mathrm{TP}+\mathrm{TN}+\mathrm{ FP}+\mathrm{FN}} \tag{6}\]  
where TP represents true positives, TN represents true negatives, FP represents false positives, and FN represents false negatives. Accuracy represents the number of correctly predicted cases relative to the total number of cases [48]. Sensitivity, also known as RE (Recall), indicates the proportion of correctly predicted positive cases (TP) out of all actual positive cases, which includes those incorrectly classified as negative (FN), and can be expressed as follows (7):  
\[\mathrm{RE}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FN}} \tag{7}\]  
This parameter should ideally have the highest possible value, just like PR (Precision), which reflects how many of the positively predicted cases are truly positive, and which can be expressed as follows (8):  
\[\mathrm{PR}=\frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FP}} \tag{8}\]  
\"Ideal\" prediction refers to the case in which sensitivity and precision are equal to 1, meaning that false-negative and false-positive results do not exist. The ROC curve, which is formed by plotting pairs of \(1-\mathrm{PR}\) and RE values for each cutoff point, where the horizontal axis represents \(1-\mathrm{PR}\) values, the vertical axis represents RE values, and the area under the ROC curve, or so-called AUC, is also used for evaluation. Given the values present in the logistic regression, it takes values from 0 to 1. A higher value of the area under the curve indicates greater discrimination (classification of occurrences and non-occurrences). Typically, the classification presented in Table 2 is used to assess AUC. To assess the full picture of the model's predictive capabilities, it is necessary to evaluate it on data other than those in the training set. For this purpose, v-fold cross-validation is used, which is a method involving the division of the sample into v subsets, followed by conducting all analyses on some of them, referred to as the training set, while the others are used to confirm the reliability of the results, known as the test set [45]. Model fit can also be assessed using the Hosmer-Lemeshow test (H-L), which compares the observed frequencies of the outcome variable Og with the predicted probabilities Eg. This test tests the hypothesis that the observed and predicted values are equal. The above test adopts the following hypotheses:  
**H0.H5. **: \(O_{g}=E_{g}\) _for all categories._
**H1.H5. **: \(O_{g}\
eq E_{g}\) _for at least one category._  
If the values of Og and Eg are close, then it can be assumed that a well-fitting model has been built. A lack of significance for this test is desirable [48].