Learn R Programming

performance (version 0.1.0)

model_performance: Model Performance

Description

See the documentation for your object's class: lm, glm, mixed models and Bayesian models. compare_performance() computes indices of model performance for different models.

Usage

model_performance(model, ...)

compare_performance(..., metrics = "all")

Arguments

model

Statistical model.

...

Arguments passed to or from other methods, resp. for compare_performance(), one or multiple model objects (also of different classes).

metrics

Can be "all" or a character vector of metrics to be computed. See related documentation of object's class for details.

Value

For model_performance(), a data frame (with one row) and one column per "index" (see metrics). For compare_performance(), the same data frame with one row per model.

Examples

Run this code
# NOT RUN {
library(lme4)

m1 <- lm(mpg ~ wt + cyl, data = mtcars)
model_performance(m1)

m2 <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
m3 <- lmer(Petal.Length ~ Sepal.Length + (1 | Species), data = iris)
compare_performance(m1, m2, m3)

# }

Run the code above in your browser using DataLab