toOR: Function to transform a fit object from glm into an OR table

View source: R/toOR.R

toORR Documentation

Function to transform a fit object from glm into an OR table

Usage

toOR(fit,dec)

Arguments

fit

Fitted model using glm() function

digits

integer indicating the number of decimal places (round) or significant digits (signif) to be used. Negative values are allowed (see ‘Details’).

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## Dobson (1990) Page 93: Randomized Controlled Trial :
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
data.frame(treatment, outcome, counts) # showing data
glm.D93 <- glm(counts ~ outcome + treatment, family = poisson())
toOR(glm.D93,digits=2)











douve/UEMR documentation built on Aug. 28, 2023, 2:30 p.m.