# NOT RUN {
library(sjmisc)
data(efc)
# Tjur's R-squared value
efc$services <- ifelse(efc$tot_sc_e > 0, 1, 0)
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