knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) devtools::load_all()
After fitting a logistic model in R using glm
, getting classification rates, ROC curves and AUCs are non-trivial - they're easy to do, but require coding manually every time.
The postr
package simplifies this.
data(mtcars) m <- glm(vs ~ gear + mpg, data = mtcars, family = binomial)
All functions are prefaced by postr_
(aliased with pr_
) to simplify the names without worrying about conflicts with other packages. For example,
postr_classificationtable(m, threshold = .4) pr_sensitivity(m, threshold = .4) pr_AUC(m)
pr_ROC(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.