pseudoR2 | R Documentation |
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.
pseudoR2(object, ...)
## Default S3 method:
pseudoR2(object, ...)
## S3 method for class 'pltree'
pseudoR2(object, newdata = NULL, ...)
## S3 method for class 'bttree'
pseudoR2(object, ...)
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 |
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 |
Kauê de Sousa and Jacob van Etten
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.
Other goodness-of-fit functions:
kendallTau()
,
kendallW()
data("airquality")
mod = glm(Temp ~ Wind + Solar.R,
data = airquality,
family = poisson())
pseudoR2(mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.