odds.n.ends {odds.n.ends} | R Documentation |
A binary logistic regression function
Description
This function allows you to compute model significance (model chi-squared), model fit (percent correctly predicted, sensitivity, specificity), ROC plot, predicted probability plot, and odds ratios with 95 percent confidence intervals for a glm object from a binary logistic regression analysis.
Usage
odds.n.ends(
mod,
thresh = 0.5,
rocPlot = FALSE,
predProbPlot = FALSE,
color1 = "#7463AC",
color2 = "deeppink"
)
Arguments
mod |
is a glm object |
thresh |
is the threshold between 0-1 for predicted prob to be considered a case |
rocPlot |
is TRUE or FALSE to display an ROC plot |
predProbPlot |
is TRUE or FALSE to display predicted prob histogram by outcome value |
color1 |
choose color for plot |
color2 |
choose 2nd color for plot |
Examples
sick <- c(0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1)
age <- c(23, 25, 26, 34, 54, 46, 48, 95, 81, 42, 62, 25, 31, 49, 57, 52, 54, 63, 61, 50)
logisticModel <- glm(sick ~ age, na.action = na.exclude, family = binomial(logit))
odds.n.ends(mod = logisticModel)
[Package odds.n.ends version 0.1.4 Index]