chest_lm {chest} | R Documentation |
Assessing confounding effects using Linear regression models
Description
'chest_lm'
is used to assess confounding effects using Linear Regression Models.
It presents linear regression coefficients as effect estimates and
changes when other variables are added sequentially to the model.
Usage
chest_lm(
crude,
xlist,
data,
method = "qr",
na_omit = TRUE,
indicate = FALSE,
plus = " + ",
...
)
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 all variable names of potential confounders. |
data |
Data frame. |
method |
The method to be used; see 'lm'. |
na_omit |
Remove all missing values. |
indicate |
indicate progress |
plus |
Change the |
... |
Further optional arguments. |
Value
A table with effect estimates and their changes at all steps.
See Also
'lm'
of 'stats'
Examples
vlist <- c("Age", "Sex", "Married", "Cancer", "CVD", "Education", "Income")
chest_lm(crude = "BMI ~ Diabetes", xlist = vlist, data = diab_df, na_omit = TRUE)
[Package chest version 0.3.7 Index]