% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_performance.lm.R
\name{model_performance.lm}
\alias{model_performance.lm}
\title{Performance of Regression Models}
\usage{
\method{model_performance}{lm}(model, metrics = "all", verbose = TRUE, ...)
}
\arguments{
\item{model}{A model.}

\item{metrics}{Can be \code{"all"}, \code{"common"} or a character vector of metrics to be computed (some of \code{c("AIC", "BIC", "R2", "RMSE", "SIGMA", "LOGLOSS", "PCP", "SCORE")}). \code{"common"} will compute AIC, BIC, R2 and RMSE.}

\item{verbose}{Toggle off warnings.}

\item{...}{Arguments passed to or from other methods.}
}
\value{
A data frame (with one row) and one column per "index" (see \code{metrics}).
}
\description{
Compute indices of model performance for regression models.
}
\details{
Depending on \code{model}, following indices are computed:
\itemize{
  \item{\strong{AIC}} {Akaike's Information Criterion, see \code{?stats::AIC}}
  \item{\strong{BIC}} {Bayesian Information Criterion, see \code{?stats::BIC}}
  \item{\strong{R2}} {r-squared value, see \code{\link{r2}}}
  \item{\strong{R2_adj}} {adjusted r-squared, see \code{\link{r2}}}
  \item{\strong{RMSE}} {root mean squared error, see \code{\link{performance_rmse}}}
  \item{\strong{SIGMA}} {residual standard deviation, see \code{\link[insight:get_sigma]{get_sigma()}}}
  \item{\strong{LOGLOSS}} {Log-loss, see \code{\link{performance_logloss}}}
  \item{\strong{SCORE_LOG}} {score of logarithmic proper scoring rule, see \code{\link{performance_score}}}
  \item{\strong{SCORE_SPHERICAL}} {score of spherical proper scoring rule, see \code{\link{performance_score}}}
  \item{\strong{PCP}} {percentage of correct predictions, see \code{\link{performance_pcp}}}
}
}
\examples{
model <- lm(mpg ~ wt + cyl, data = mtcars)
model_performance(model)

model <- glm(vs ~ wt + mpg, data = mtcars, family = "binomial")
model_performance(model)
}
