Title: Odds Ratios, Contingency Table, and Model Significance from a Generalized Linear Model Object
Version: 0.1.4
Imports: MASS
Description: Computes odds ratios and 95% confidence intervals from a generalized linear model object. It also computes model significance with the chi-squared statistic and p-value and it computes model fit using a contingency table to determine the percent of observations for which the model correctly predicts the value of the outcome. Calculates model sensitivity and specificity.
License: CC0
Encoding: UTF-8
RoxygenNote: 7.1.1
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2021-09-17 20:04:12 UTC; harrisj
Author: Jenine Harris [aut, cre]
Maintainer: Jenine Harris <harrisj@wustl.edu>
Repository: CRAN
Date/Publication: 2021-09-17 20:20:02 UTC

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)

mirror server hosted at Truenetwork, Russian Federation.