summaryOR: Odds ratio summary statistics #' @author JuG

View source: R/summaryOR.R

summaryORR Documentation

Odds ratio summary statistics #' @author JuG

Description

Odds ratio summary statistics

Usage

summaryOR(glm.fit, lateX = TRUE, graph = FALSE, digits = 3, ...)

Arguments

glm.fit

an object of class "glm.fit" calculated with a "binomial "link function.

lateX

if TRUE, return lateX xtable of the result table

graph

if TRUE, plot the coefficients of a model with broom and ggplot2

Details

Provide Odds ratio (exponential of the glm.fit coefficients) and their confidence intervals (given by confint). Stars are "***" if p-value < 0.001, "**" if 0.001 < p-value <= 0.01, "*" if 0.01 < p-value <= 0.05, "." if 0.05 < p-value <=0.1

Examples

y <- rbinom(n = 50, size = 1, prob = .3)
x1 <- rnorm(50, 5,1)
x2 <- runif(50, 0,5) * (1 + 2*y)
x3 <- rnorm(50, 12,5)
 Data <- data.frame(y,x1,x2,x3)

 logist <- glm(y~., data=Data, family="binomial")
 summary(logist)
 summaryOR(glm.fit=logist,lateX=FALSE,graph=FALSE, digits=4)

jgodet/utilitR documentation built on May 16, 2024, 12:01 p.m.