Learn R Programming

psycho (version 0.4.91)

get_R2.glm: Pseudo-R-squared for Logistic Models.

Description

Pseudo-R-squared for Logistic Models.

Usage

# S3 method for glm
get_R2(fit, method = "nakagawa", ...)

Arguments

fit

A logistic model.

method

Can be "nakagawa" or "tjur".

...

Arguments passed to or from other methods.

Examples

Run this code
# NOT RUN {
library(psycho)

fit <- glm(vs ~ wt, data = mtcars, family = "binomial")
fit <- glm(Sex ~ Adjusting, data = psycho::affective, family = "binomial")

get_R2(fit)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab