all_speedglm {allestimates}R Documentation

Effect estimates from all possible models using speedglm

Description

This is a faster alternative to all_glm. all_speedglm estimates odds ratios or rate ratios using generalized linear models (speedglm) with all possible combinations of a list of variables (potential confounding factors) specified in xlist argument.

Usage

all_speedglm(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 characters with variable names to be included in as potential confounding factors.

data

Data frame.

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

speedglm

Examples

vlist <- c("Age", "Sex", "Married", "Cancer", "CVD", "Education")
results <- all_speedglm(crude = "Endpoint ~ Diabetes", xlist = vlist, data = diab_df)
results$estimate
all_plot(results)

[Package allestimates version 0.2.1 Index]