all_lm {allestimates} | R Documentation |
lm
all_lm
estimates coefficients of a specific variable using
linear models (lm
) with all possible combinations of other variables (potential confounding factors).
all_lm(crude, xlist, data, na_omit = TRUE, ...)
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 |
... |
Further optional arguments. |
A list of all effect estimates.
lm
vlist <- c("Age", "Sex", "Cancer", "CVD", "Education", "Income")
all_lm(crude = "BMI ~ Married", xlist = vlist, data = diab_df)