r2_kullback | R Documentation |
Calculates the Kullback-Leibler-divergence-based R2 for generalized linear models.
r2_kullback(model, ...)
## S3 method for class 'glm'
r2_kullback(model, adjust = TRUE, ...)
model |
A generalized linear model. |
... |
Additional arguments. Currently not used. |
adjust |
Logical, if |
A named vector with the R2 value.
Cameron, A. C. and Windmeijer, A. G. (1997) An R-squared measure of goodness of fit for some common nonlinear regression models. Journal of Econometrics, 77: 329-342.
model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
r2_kullback(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.