r - Model Fit statistics for a Logistic Regression -


i'm running logistic regression model in r. i've used both zelig , car packages. however, i'm wondering if there simple way model fit statistics model. (pseudo r-square, chi-square, log liklihood,etc)

assume glm1 ist model , samplesize n = 100.

here goodness-of-fit-measures:

r2<-1-((glm1$deviance/-2)/(glm1$null.deviance/-2)) cat("mcfadden r2=",r2,"\n")

r2<-1-exp((glm1$deviance-glm1$null.deviance)/2*n) cat("cox-snell r2=",r2,"\n")

r2<-r2/(1-exp((-glm1$null.deviance)/n)) cat("nagelkerke r2=",r2,"\n")

aic<- glm1$deviance+2*2 cat("aic=",aic,"\n")

in way have overview of how calculating gof-measurements.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -