Calculate the R2 value for different model objects. Depending on the model, R2, pseudo-R2 or marginal / adjusted R2 values are returned.

r2(model, ...)

model | A statistical model. |
---|---|

... | Arguments passed down to the related r2-methods. |

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

Models with zero-inflation: R2 for zero-inflated models

Mixed models: Nakagawa's R2

Bayesian models: R2 bayes

`r2_bayes`

, `r2_coxsnell`

, `r2_kullback`

,
`r2_loo`

, `r2_mcfadden`

, `r2_nagelkerke`

,
`r2_nakagawa`

, `r2_tjur`

, `r2_xu`

and
`r2_zeroinflated`

.

#> $R2_Tjur #> Tjur's R2 #> 0.4776926 #>if (require("lme4")) { model <- lmer(Sepal.Length ~ Petal.Length + (1 | Species), data = iris) r2(model) }#> # R2 for Mixed Models #> #> Conditional R2: 0.969 #> Marginal R2: 0.658