R² is calculated as the square of the correlation coefficient (r) between the observed and predicted values of the dependent variable. The formula is: \[ R^2 = 1 - \frac{\sum (y_i - \hat{y}_i)^2}{\sum (y_i - \bar{y})^2} \] where: - \( y_i \) = observed values - \( \hat{y}_i \) = predicted values - \( \bar{y} \) = mean of observed values