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