开发者

generalized R squared (Naglekerkes R^2)

开发者 https://www.devze.com 2023-03-10 06:32 出处:网络
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?

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!"


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 ...

0

精彩评论

暂无评论...
验证码 换一张
取 消