## 2 Materials and Methods
### Statistical Analysis  
The quantitative variables were summarized using mean\(\pm\)standard deviation (SD), median and interquartile range (25 th and 75 th percentiles). The Shapiro-Wilk test was employed to assess if the quantitative variables followed normal distribution. The Student's \(t\)-test was run to compare the normally distributed variables between two groups, while an ANOVA was used when there were three groups or more. For the non-normally distributed variables, the Mann-Whitney test and the Kruskal-Wallis test were, respectively, carried out. Differences in the qualitative variables among independent groups where compared by the \(\chi^{2}\) test. The predictive score model for early KC detection was defined using multivariate logistic regression with the control and RETICS grade I groups. Seventeen variables were included in the model: two demographic (age and gender), seven optical (CDVA, coma-like, Q8 mm, spherical-like, RMS total, high-order, astigmatism), five pachymetry (central thickness, temporal, nasal, superior, inferior) and three morpho-geometric (total volume, anterior surface area, posterior surface area). Model discriminative efficiency was evaluated by receiver operating characteristic (ROC) curves, when area under curve (AUC), sensitivity and specificity were taken as performance indicators. An internal cross-validation procedure was followed using bootstrap aggregating (bagging) [38]. This procedure works as follows: it first generates a new dataset of equal size by sampling with replacement from the original dataset. The model is then trained with these data. Finally, this model is used to make predictions on those cases not used during training. This procedure is repeated 100 times to obtain a set of quality parameters that can be averaged, and confidence intervals that can be calculated. On average, 63.2% of the original data were used in all these 100 training steps. The remaining 36.8% were used for validation. Ordinal multivariate logistic regression was utilized to determine the RETICS grade with the same predictor variables. In this case, the confusion matrix was employed to estimate model performance by means of sensitivity, specificity and balanced accuracy per group. Data were evaluated by R Statistics v3.6.1 (R Foundation for Statistical Computing, Vienna, Austria) [39]. Packages \"tidyr\", \"dplyr\", \"dlookr\" and \"smbinning\" were used for data loading, exploration and transformation. Packages \"corplot\", \"yarrr\" and \"FactoMiner\" were employed for data visualization. Packages \"pROC\", \"ROCR\" and \"Epi\" were utilized for the ROC curve analysis and representation. Logistic regression models were trained with the \"glm\" function from the base package. Ordered logistic regression models were trained with the \"polr\" function from the MASS package. Confusion matrices were analyzed by the \"caret\" package. Optimal sample size calculations were made by the \"rompanion\" and \"pmsampsize\" packages. The statistical power analysis was conducted with simulation using the Wald test to estimate the power for each covariate according to sample size, as described in the literature [40; 41]. A web application was developed using Shiny v1.3.2 (RStudio Inc., Boston, MA, USA) [42] and the ShinyAuthr v0.0.99 authentication module ([PERSON], Paris, France) [43]. This application was deployed in a private secure institutional network (because patients' clinical data were used, and the application was, therefore, accessible only from controlled computers to minimize the security risks linked to using patients' data). Application landing page, shown in Figure 2, is a login form that adds a secured authentication layer. No registering possibility was included, and new users can only be directly added by the administrator. After logging in, users view a form with text boxes corresponding to all the model predictors that are filled by default with sample values from a healthy individual.