## 3 Materials and Methods
### Modeling
#### 3.2.1 Random Forest Modeling  
Given the complex, potentially nonlinear relationships among the variables influencing cloud adoption, this study employs advanced machine learning algorithms to model these associations robustly. Building on prior research [44; 45], ensemble-based algorithms, particularly Random Forest regressors, are selected for their capacity to handle high-dimensional datasets, accommodate missing values, and capture intricate interaction effects. These characteristics render them especially suitable for modeling the multifaceted dynamics of digital transformation across countries and over time. A Random Forest (RF) model estimates the relationship:  
\[y=f(X)+\epsilon \tag{2}\]  
where \(f(X)\) is an unknown, potentially nonlinear function mapping the predictors to the dependent variable (cloud adoption), and \(e\sim N\big{(}0,\sigma^{2}\big{)}\) accounts for unobserved random noise. Specifically, for the first dataset, the RF will model  
\[Cloud\_Adoption \tag{3}\] \[=f(Higher\_Education,GDP\_per\_Capita,GDP,Unemployment\_Rate,ICT\_Specialists, Broadband\_Access)\]whereas it will omit the last predictor for the second one. The RF constructs an ensemble of decision trees \(\{T_{1},T_{2},\ldots,T_{m}\}\), each trained on bootstrap samples of the original data. Predictions are obtained as the average across all trees:  
\[\hat{y}=\frac{1}{m}{\sum_{k=1}^{m}T_{k}(X)} \tag{4}\]  
The models were trained on two distinct datasets reflecting different temporal domains, corresponding to the availability of the broadband variable. For the period 2014-2021, data include broadband access as a predictor; for 2014-2024, this variable is omitted, thus enabling a robustness check of the model's stability and the influence of digital infrastructure. The dataset was randomly split into training (80%) and testing (20%) subsets to evaluate out-of-sample predictive accuracy, with all splits fixed via a set seed to ensure reproducibility. To improve the forecasting trustworthiness, a linear trend analysis was performed on the historical data before modeling, and the results were then incorporated into the projections. Approximately 10-fold cross-validation was used to enhance hyperparameter tuning, such as the number of trees (m), maximum tree depth (d), and minimum samples per split (s). This method reduces the mean squared error, or MSE:  
\[\text{MSE}=\frac{1}{n}{\sum_{i=1}^{n}(y_{i}-\hat{y_{i}})^{2}} \tag{5}\]  
Parallel to RF, alternative ensemble methods Extreme Gradient Boosting (XGBoost), Elastic Net regression, and Support Vector Machines (SVM with a linear kernel) were also implemented to benchmark predictive performance and assess model stability across different algorithms under identical validation schemes. To evaluate model performance across different machine learning algorithms, we used 10-fold cross-validation, assessing each model M\({}_{\text{m}}\) based on the Root Mean Squared Error (RMSE):  
\[\text{RMSE}_{\text{M}_{\text{m}}}=\sqrt{\frac{1}{n}{\sum_{i=1}^{n}\left(\hat{ y_{i}}-\hat{y_{i}^{(M_{\text{m}})}}\right)^{2}}} \tag{6}\]  
where \(\hat{y_{i}^{(M_{\text{m}})}}\) is the predicted value for observation i using model M\({}_{\text{m}}\), and n is the number of observations in the validation fold. Additionally, a weighted ensemble model was defined as  
\[\hat{y_{\text{Ensemble}}}={\sum_{m=1}^{M}w_{m}\hat{y_{i}^{(M_{\text{m}})}}} \tag{7}\]  
where \(w_{m}\) denotes the weight assigned to each base model, and weights were optimized to minimize RMSE on the validation set. The ensemble was constructed using the caretEnsemble package, which optimizes model weights to minimize cross-validated RMSE. Although SVM received zero weight in the final ensemble, it was fully trained and included in the optimization process. Model training times were recorded to benchmark efficiency. Of note, all continuous predictors were standardized (mean zero, unit variance) prior to model training, ensuring comparability across models.