R/odds_ratio.R

Defines functions odds_ratio

Documented in odds_ratio

#' @export
odds_ratio<-function(Cell1, Cell2, Cell3, Cell4){
  OR<-(Cell1*Cell3)/(Cell2*Cell4)
  SE<-1.96*sqrt(((1/Cell1)+(1/Cell2)+(1/Cell3)+(1/Cell4)))
  lnOR<-log(OR)
  ORLower95<-(lnOR)-(SE)
  ORUpper95<-(lnOR)+(SE)
  message(paste('Odds Ratio =', OR))
  message(paste('95% Lower Bound =', (exp(ORLower95))))
  message(paste('95% Upper Bound =', (exp(ORUpper95))))}

Try the ClinSigMeasures package in your browser

Any scripts or data that you put into this service are public.

ClinSigMeasures documentation built on Feb. 25, 2021, 5:08 p.m.