Learn R Programming

sjmisc (version 1.0.2)

cod: Computes Tjur's Coefficient of Discrimination

Description

This method calculates the Coefficient of Discrimination D for glms or glmers for binary data. It is an alternative to other Pseudo-R-squared values like Nakelkerke's R2 or Cox-Snell R2.

Usage

cod(x)

Arguments

x
a fitted glm or glmer.

Value

  • The D Coefficient of Discrimination, also known as Tjur's R-squared value.

References

Tjur T (2009) Coefficients of determination in logistic regression models - a new proposal: The coefficient of discrimination. The American Statistician, 63(4): 366-372

Examples

Run this code
data(efc)

# Tjur's R-squared value
efc$services <- dicho(efc$tot_sc_e, "v", 0, asNum = TRUE)
fit <- glm(services ~ neg_c_7 + c161sex + e42dep,
           data = efc,
           family = binomial(link = "logit"))
cod(fit)

Run the code above in your browser using DataLab