pseudoR2: Pseudo R-squared

View source: R/AAA-pseudoR2.R

pseudoR2R Documentation

Pseudo R-squared

Description

Regression coefficient to evaluate goodness-of-fit in a given model when ordinary least squares (OLS) are not available. The algorithm computes estimates from the maximum likelihood through an iterative process. These estimates are called 'pseudo R-squared' because they look like 'R-squared' in the sense that they are on a similar scale (from 0 to 1), with higher values indicating better model fit.

Usage

pseudoR2(object, ...)

## Default S3 method:
pseudoR2(object, ...)

## S3 method for class 'pltree'
pseudoR2(object, newdata = NULL, ...)

## S3 method for class 'bttree'
pseudoR2(object, ...)

Arguments

object

a model object of class glm, gnm, lm, pltree or bttree

...

additional arguments affecting the R-squared produced

newdata

a data.set with testing data

Value

A data frame containing the pseudo R-squared coefficients:

logLik

log-likelihood

logLikNull

Null log-likelihood

MaxLik

maximum likelihood pseudo R-squared

CraggUhler

Cragg and Uhler's pseudo R-squared

McFadden

McFadden pseudo R-squared

Author(s)

Kauê de Sousa and Jacob van Etten

References

Agresti A. (2002). Categorical Data Analysis. John Wiley & Sons, Inc., Hoboken, NJ, USA. doi:10.1002/0471249688

Hunter D. R. (2004). The Annals of Statistics, 32(1), 384–406. http://www.jstor.org/stable/3448514

Cragg, J. G., & Uhler, R. S. (1970). The Canadian Journal of Economics 3(3), 386-406. doi:10.2307/133656

McFadden, D. (1973). Conditional logit analysis of qualitative choice behavior.

See Also

Other goodness-of-fit functions: kendallTau(), kendallW()

Examples


data("airquality")

mod = glm(Temp ~ Wind + Solar.R,
           data = airquality,
           family = poisson())

pseudoR2(mod)


gosset documentation built on May 29, 2024, 8:34 a.m.