0

does anybody know how to compute Naglekerkes generalized R Squared for GLMs using R? And does it makes any sence to use it for count data regression?

References:

generalized R^2

"Scroll down at to the bottom of this article!"

Aniko
  • 18,516
  • 4
  • 48
  • 45
user734124
  • 489
  • 8
  • 20

1 Answers1

2

Try

library(sos)  ## you may have to install.packages("sos") first
findFn("nagelkerke")

This finds functions in various packages: probably most useful are lrm in the rms package (an updated version of the Design package) and NagelkerkeR2 in the fmsb package. Although if by "count data regression" you mean a Poisson rather than a binomial/binary model, lrm won't do it for you. But the other should.

I don't see why it wouldn't apply to count data (Poisson regression) ... although there is always debate about how useful the various analogues of R2 are once you get outside the realm of ordinary linear models ...

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453