r2_somers function

Somers' Dxy rank correlation for binary outcomes

Somers' Dxy rank correlation for binary outcomes

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

r2_somers(model)

Arguments

  • model: A logistic regression model.

Returns

A named vector with the R2 value.

Examples

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

References

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

  • Maintainer: Daniel Lüdecke
  • License: GPL-3
  • Last published: 2025-01-15