all_glm: Estimates all possible effect estimates using 'glm'

Description Usage Arguments Value See Also Examples

View source: R/all_glm.R

Description

all_glm estimates odds ratios or rate ratios using generalized linear models (glm) with all possible combinations of a list of variables (potential confounding factors).

Usage

1
all_glm(crude, xlist, data, family = "binomial", na_omit = TRUE, ...)

Arguments

crude

An object of formula for initial model, generally crude model. However, any other variables can also be included here as the initial model.

xlist

A vector of a list of variable names (potential confounding factors).

data

Data frame.

family

family Description of the error distribution. Default is "binomial".

na_omit

Remove all missing values. Default is "na_omit = TRUE".

...

Further optional arguments.

Value

A list of all effect estimates.

See Also

stats

Examples

1
2
3
diab_df$Overweight <- as.numeric(diab_df$BMI >= 25)
vlist <- c("Age", "Sex", "Income")
all_glm(crude = "Diabetes ~ Overweight", xlist = vlist, data = diab_df)

allestimates documentation built on Jan. 20, 2021, 5:05 p.m.