postr

R package for postestimation on GLM models

CC0-1.0 License

Stars
1

Post estimation for GLMs in R

After fitting a logistic model in R using glm, getting classification rates, ROC curves and AUCs are non-trivial - theyre 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)
#>         Classified
#> Observed  0  1
#>        0 13  5
#>        1  3 11
pr_sensitivity(m, threshold = .4)
#> [1] 0.7857143
pr_AUC(m)
#> [1] 0.9246032

pr_ROC(m)
Badges
Extracted from project README
R-build-check Coverage status
Related Projects