powered by
Calculate the R2 value for different model objects. Depending on the model, R2, pseudo-R2 or marginal / adjusted R2 values are returned.
r2(model, ...)
A statistical model.
Currently not used.
Returns a list containing values related to the most appropriate R2 for the given model. See the list below:
Logistic models: Tjur's R2
General linear models: Nagelkerke's R2
Multinomial Logit: McFadden's R2
Mixed models: Nakagawa's R2
Bayesian models: R2 bayes
link{r2_bayes}, link{r2_coxsnell}, link{r2_kl}, link{r2_loo}, link{r2_mcfadden}, link{r2_nagelkerke}, link{r2_nakagawa} and link{r2_tjur}.
link{r2_bayes}
link{r2_coxsnell}
link{r2_kl}
link{r2_loo}
link{r2_mcfadden}
link{r2_nagelkerke}
link{r2_nakagawa}
link{r2_tjur}
# NOT RUN { model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial") r2(model) library(lme4) model <- lmer(Sepal.Length ~ Petal.Length + (1 | Species), data = iris) r2(model) # }
Run the code above in your browser using DataLab