Learn R Programming

clintools (version 0.9.10.1)

ortable: Logistic regression table with Odds ratio (ortable)

Description

ortable() is a small function which utilises the output from the glm-function to print a dataframe with odds ratio, confidence limits, and p-values.

Usage

ortable(x, d, d_p, intercept, simple)

Value

Returns a dataframe with with odds ratio, confidence limits, and p-values.

Arguments

x

Utilises the output from a glm-function. (glm-output)

d

Refers to the number of digits for odds ratio and confidence intervals. Default is 2. (numeric)

d_p

Refers to the number of digits for odds ratio and confidence intervals. Default is 3. (numeric)

intercept

The intercept is presented in the table if TRUE. Default is FALSE. (boolian)

simple

Odds ratio and confidence intervals are merged into one column if TRUE. Default is TRUE. (boolian)

Examples

Run this code
df <- data.frame(outcome=sample(0:1, 100,replace=TRUE),
        var=sample(0:100,100,replace=TRUE))
ortable(glm(outcome ~ ., data=df))

Run the code above in your browser using DataLab