Nagelkerke R² is a normalized version of the likelihood ratio R², scaled to have a maximum of 1.
It is commonly used for generalized linear models but can also be applied to linear models.
The formula used is:
$$R^2_{Nagelkerke} = \frac{1 - \exp\left(\frac{2}{n} (LL_{null} - LL_{model})\right)}{1 - \exp\left(\frac{2}{n} LL_{null}\right)}$$
where \(LL_{model}\) is the log-likelihood of the fitted model and \(LL_{null}\) is the log-likelihood of the null model.