2

I used logistic regression and found that my model fits well:

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.6434  -1.4623   0.8704   0.9013   1.0066  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept)   0.41595    0.02115   19.67   <2e-16 ***
init_att_cnt  0.02115    0.00146   14.48   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)

Null deviance: 154956  on 122239  degrees of freedom
Residual deviance: 154746  on 122238  degrees of freedom
AIC: 154750

The chi-squared test is hightly statisticaly significant: p = 9.642755e-48. I decided to check the Nagelkerke $R^2$ statistic,

R2 <- R2/(1-exp((-mylogit$null.deviance)/n))

but it was $R^2 = 0.001350927$. This is unbelievable, why is $R^2$ so small, if my model fits well?

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
Julia
  • 73
  • 1
  • 4
  • 2
    Having coefficient estimates that are clearly not zero doesn't mean your model is "good"---you could be missing many other parameters that would also be significant. – Gregor Thomas Mar 05 '15 at 17:32
  • 2
    Other than the small p-values, what makes you think your model fits well? How did you calculate the initial `R2` to get your Nagelkerke value? It may help you to read [this](http://stats.stackexchange.com/q/3559/). – gung - Reinstate Monica Mar 05 '15 at 17:35
  • 1
    A reproducible example would help, as would showing all your calculations. – Jeremy Miles Mar 05 '15 at 17:41
  • Gregor what about parameters did you say? Gung i calculated R2 only use this formula R2 – Julia Mar 06 '15 at 08:35

0 Answers0