performance: Model Performance

View source: R/performance.R

performanceR Documentation

Model Performance

Description

Indices of model performance for linear and logistic regression models. The output depends on the form of the model (linear or logistic regression).

Usage

performance(x, ...)

Arguments

x

an object of type "lm" or "glm".

...

further arguments passed to or from other methods.

Details

The performance function can be used to evaluate the predictive performance of a model with new data. If a data frame is not specified, the performance is evaluated on the training data (i.e., the data contained in the model component of the lm or glm object).

Value

The results of the methods performance.lm or performance.glm

See Also

performance.lm, performance.glm

Examples

#######################
# multiple regression #
#######################
fit <- lm(mpg ~ hp + wt + accel + origin, data = auto_mpg)
performance(fit)

#######################
# logistic regression #
#######################
fit2 <- glm(caesarian ~ age + bp + delivery.time, family = binomial, data = caesarian)
performance(fit2)


Rkabacoff/qacReg documentation built on Aug. 1, 2022, 11:11 p.m.