performance | R Documentation |
Indices of model performance for linear and logistic regression models. The output depends on the form of the model (linear or logistic regression).
performance(x, ...)
x |
an object of type |
... |
further arguments passed to or from other methods. |
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).
The results of the methods performance.lm
or
performance.glm
performance.lm
, performance.glm
####################### # 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.