Odds Ratio Calculation for GAM(M)s & GLM(M)s

Simplified odds ratio calculation of GAM(M)s & GLM(M)s. Provides structured output (data frame) of all predictors and their corresponding odds ratios and confident intervals for further analyses. It helps to avoid false references of predictors and increments by specifying these parameters in a list instead of using 'exp(coef(model))' (standard approach of odds ratio calculation for GLMs) which just returns a plain numeric output. For GAM(M)s, odds ratio calculation is highly simplified with this package since it takes care of the multiple 'predict()' calls of the chosen predictor while holding other predictors constant. Also, this package allows odds ratio calculation of percentage steps across the whole predictor distribution range for GAM(M)s. In both cases, confident intervals are returned additionally. Calculated odds ratio of GAM(M)s can be inserted into the smooth function plot.


oddsratio 1.0.3 (June 19 2018)

  • update functions to work with ggplot2 v3.0.0

oddsratio 1.0.2 (December 08 2017)


  • Add CITATION file

oddsratio 1.0.0 (June 12 2017)


  • rename functions (snake_case)

oddsratio 0.3.1 (Nov 9 2016)

  • update functions to work with ggplot2 v2.2.0
  • add data and enable lazy loading in examples

oddsratio 0.3.0 (Oct 27 2016)

New functions

  • plot_smooth.gam(): Lets you plot smoothing functions of GAM(M)s using ggplot2.
  • add.oddsratio.into.plot(): Add odds ratios into plot of GAM(M) smoothing function.

Function updates

  • calc.oddsratio.glm, calc.oddsratio.gam: Add odds ratio confident interval calculation
  • For GLM models CI level can be specified manually.
  • Print 'CI' warning if model is of type glmmPQL

oddsratio 0.2.0 (Oct 12 2016)

  • Remove param quietly
  • return data.frame in any case
  • update DESCRIPTION

oddsratio 0.1.0 (Oct 11 2016)

  • Initial release attempt to CRAN

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.0.1 by Patrick Schratz, a year ago


Report a bug at https://github.com/pat-s/oddsratio/issues

Browse source code at https://github.com/cran/oddsratio

Authors: Patrick Schratz [aut, cre]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports ggplot2, mgcv, stats

Suggests knitr, MASS, rmarkdown, testthat

See at CRAN