View source: R/model-diagnostics.R
model_metrics | R Documentation |
Calculate predictive metrics for glm models
model_metrics(model, newdata = NULL)
model |
model |
newdata |
Optional data frame |
N <- 10000
predicted <- runif(N)
actual <- rbinom(N, size = 1, prob = predicted)
daux <- data.frame(actual = actual, predicted = predicted)
m <- glm(actual ~ predicted, family = binomial, data = daux)
model_metrics(m)
model_metrics(m, newdata = head(daux, 100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.