Learn R Programming

MuMIn (version 1.7.0)

r.squaredLR: Likelihood-ratio based pseudo-R-squared

Description

Calculate a coefficient of determination based on the likelihood-ratio test (latex{$R_{LR}^{2}$}{R_LR-squared}).

Usage

r.squaredLR(x, null = null.fit(x, TRUE))

null.fit(x, evaluate = FALSE, envir = environment(as.formula(formula(x))))

Arguments

Value

  • r.squaredLR returns a value of $R_{LR}^{2}$, and the attribute "adj.r.squared" gives the Nagelkerke's modified statistic. Note that this is not the same as the classical adjusted R squared.

    null.fit returns the fitted null model object (if evaluate = TRUE) or an unevaluated call to fit a null model.

Details

This statistic is is one of the several proposed pseudo-R-squared's for nonlinear regression models. It is based on an improvement from null (intercept only) model to the fitted model, and calculated as $$R_{LR}^{2}=1-\exp(-\frac{2}{n}(\log\mathit{Lik}(x)-\log\mathit{Lik}(0)))$$ where logLik(x) and logLik(0) are the log-likelihoods of the fitted and the null model respectively.

For OLS models the value is consistent with classical $R^{2}$. In some cases (e.g. in logistic regression), the maximum $R_{LR}^{2}$ is less than one. The modification proposed by Nagelkerke (1991) adjusts the $R_{LR}^{2}$ to achieve 1 at its maximum: $\bar{R}^{2} = R_{LR}^{2} / \max(R_{LR}^{2})$ where $max(R_{LR}^{2}) = 1 - \exp(\frac{2}{n}\log\mathit{Lik}(\textrm{0}))$.

null.fit tries to guess the null model call (as a glm), given the provided fitted model object.

References

Cox, D. R. and Snell, E. J. (1989) The analysis of binary data, 2nd ed. London, Chapman and Hall

Magee, L. (1990) R$^{2}$ measures based on Wald and likelihood ratio joint significance tests. Amer. Stat. 44: 250-253

Nagelkerke, N. J. D. (1991) A note on a general definition of the coefficient of determination. Biometrika 78: 691-692

See Also

summary.lm