*2.4. Statistical Analysis*

IBM SPSS Statistics 22.0 (SPSS/IBM, Chicago, IL, USA) and Epidat version 4.1 (Department of Sanida, Xunta de Galicia, Galicia, Spain) software was used for statistical and epidemiological treatment of the data.

Continuous variables were expressed as the mean ± standard deviation, while categorical variables were expressed as the frequency and proportion distribution. The Kolmogorov–Smirnov test with Lilliefors correction and graphical representation tests, such as P–P and Q–Q plots, was applied to test the goodness of fit to a normal distribution of the data.

A Student's *t* test was used for variables with a normal distribution (using the Levene test for variance equality), whereas non-parametric tests, such as the U Mann–Whitney test (independent samples), were used for variables showing a non-normal distribution and were used for bivariate analysis. The Z test, chi squared test, and Fisher's exact test were used whenever necessary for each contingency tables of categorical variables.

Bivariate and multivariate analyses were performed by binary logistic regression. Goodness-of-fit tests for the model (2 loglikelihood, goodness-of-fit statistics, Nagelkerke R2, and Hosmer-Lemeshow test) were calculated to assess the global fit of the model. Exponentiation was used for the b-coefficients in the regression models to estimate the OR, and the standard error of the b-coefficients was used to calculate the 95% confidence interval (CI). The confounding effect was analyzed for those variables of the final model whose statistical significance value was between 0.05 and 0.2. It was considered a confounding effect when the crude and adjusted Beta coefficient variation was above 10%.

Receiver Operator Characteristic (ROC) curves were constructed, and the Area Under the Curve (AUC) was calculated to determine which explanatory variables best predicted the onset of dementia and AD. The diagnostic accuracy indicators, such as sensitivity, specificity, predictive values, and Youden and Validity Indices were analyzed.

The level of statistical significance was set at *p* < 0.05, and the confidence intervals were calculated at a 95% level.
