Skip to contents

Computes indices of model performance for regression models.

Usage

glance_performance(x, ...)

Arguments

x

model or other R object to convert to single-row data frame

...

other arguments passed to methods

Value

A data frame (with one row) and one column per "index".

Details

The function will attempt to get these details either using broom::glance() or performance::model_performance(). If both function provide model performance measure summaries, the function will try to combine them into a single dataframe. Measures for which these two packages have different naming conventions, both will be retained.

Examples


set.seed(123)
mod <- lm(mpg ~ wt + cyl, data = mtcars)
broomExtra::glance_performance(mod)
#> # A tibble: 1 × 13
#>   r.squared adj.r.squa…¹ sigma stati…²  p.value    df loglik   aic   bic devia…³
#>       <dbl>        <dbl> <dbl>   <dbl>    <dbl> <dbl>  <dbl> <dbl> <dbl>   <dbl>
#> 1     0.830        0.819  2.57    70.9 6.81e-12     2  -74.0  156.  162.    191.
#> # … with 3 more variables: df.residual <int>, nobs <int>, rmse <dbl>, and
#> #   abbreviated variable names ¹​adj.r.squared, ²​statistic, ³​deviance