r2_somers: Somers' Dxy rank correlation for binary outcomes

View source: R/r2_somers.R

r2_somersR Documentation

Somers' Dxy rank correlation for binary outcomes

Description

Calculates the Somers' Dxy rank correlation for logistic regression models.

Usage

r2_somers(model)

Arguments

model

A logistic regression model.

Value

A named vector with the R2 value.

References

Somers, R. H. (1962). A new asymmetric measure of association for ordinal variables. American Sociological Review. 27 (6).

Examples


if (require("correlation") && require("Hmisc")) {
  model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
  r2_somers(model)
}



performance documentation built on Oct. 19, 2024, 1:07 a.m.