install.packages("binomTools") library("binomTools") # The Rsq function computes several fit indices, # including the coefficient of discrimination. # For information on the other fit indices, see Tjur (2009). # The plot shows the distribution of expected values when the outcome is observed # and not observed. # Ideally, the overlap between the two histograms should be small. fit <- Rsq(object = logit.reg) fit # R-square measures and the coefficient of discrimination, 'D': # # R2mod R2res R2cor D # 0.5205221 0.5024101 0.5025676 0.5114661 # # Number of binomial observations: 70 # Number of binary observation: 70 # Average group size: 1 plot(fit, which = "hist")