Learn R Programming

pscl (version 1.02)

pR2: compute various pseduo-R2 measures

Description

compute various pseduo-R2 measures for various GLMs

Usage

pR2(object, ...)

Arguments

object
a fitted model object, for now of class glm, polr, or mulitnom
...
additional arguments to be passed to or from functions

Value

  • A vector of length 6 containing
  • llhThe log-likelihood from the fitted model
  • llhNullThe log-likelihood from the intercept-only restricted model
  • G2Minus two times the difference in the log-likelihoods
  • McFaddenMcFadden's pseudo r-squared
  • r2MLMaximum likelihood pseudo r-squared
  • r2CUCragg and Uhler's pseudo r-squared

Details

Numerous pseudo r-squared measures have been proposed for generalized linear models, involving a comparison of the log-likelihood for the fitted model against the log-likelihood of a null/restricted model with no predictors, normalized to run from zero to one as the fitted model provides a better fit to the data (providing a rough analogue to the computation of r-squared in a linear regression).

References

Long, J. Scott. 1997. Regression Models for Categorical and Limited Dependent Variables. Sage. pp104-106.

See Also

extractAIC, logLik

Examples

Run this code
data(admit)
require(MASS)
## ordered probit model
op1 <- polr(score ~ gre.quant + gre.verbal + ap + pt + female,
            Hess=TRUE,
            data=admit,
            method="probit")
pR2(op1)

Run the code above in your browser using DataLab