r2_coxsnell: Cox & Snell's R2

Description Usage Arguments Details Value References Examples

View source: R/r2_coxsnell.R

Description

Calculates the pseudo-R2 value based on the proposal from Cox & Snell (1989).

Usage

1
r2_coxsnell(model, ...)

Arguments

model

Model with binary outcome.

...

Currently not used.

Details

This index was proposed by Cox & Snell (1989, pp. 208-9) and, apparently independently, by Magee (1990); but had been suggested earlier for binary response models by Maddala (1983). However, this index achieves a maximum of less than 1 for discrete models (i.e. models whose likelihood is a product of probabilities) which have a maximum of 1, instead of densities, which can become infinite (Nagelkerke, 1991).

Value

A named vector with the R2 value.

References

Examples

1
2
model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
r2_coxsnell(model)

performance documentation built on Oct. 1, 2021, 5:08 p.m.