r2_somers | R Documentation |
Calculates the Somers' Dxy rank correlation for logistic regression models.
r2_somers(model)
model |
A logistic regression model. |
A named vector with the R2 value.
Somers, R. H. (1962). A new asymmetric measure of association for ordinal variables. American Sociological Review. 27 (6).
if (require("correlation") && require("Hmisc")) {
model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
r2_somers(model)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.