all_lm {allestimates}R Documentation

Estimates all possible effect estimates using lm

Description

all_lm estimates coefficients of a specific variable using linear models (lm) with all possible combinations of other variables (potential confounding factors).

Usage

all_lm(crude, xlist, data, na_omit = TRUE, ...)

Arguments

crude

An object of formula for initial model, generally crude model. However, additional 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.

na_omit

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

...

Further optional arguments.

Value

A list of all effect estimates.

See Also

lm

Examples

vlist <- c("Age", "Sex", "Cancer", "CVD", "Education", "Income")
all_lm(crude = "BMI ~ Married", xlist = vlist, data = diab_df)

[Package allestimates version 0.2.3 Index]