Badges Confounding; Logistic regression; Cox proportional hazards model; Linear regression;
The ‘chest’ package systematically calculates and compares effect estimates from various models with different combinations of variables. It calculates the changes in effect estimates when each variable is added to the model sequentially in a step-wise fashion. Effect estimates here can be regression coefficients, odds ratios and hazard ratios depending on modelling methods. At each step, only one variable that causes the largest change among the remaining variables is added to the model. The final results from many models are summarized in one graph and one data frame table. This approach can be used for assessing confounding effects in epidemiological studies and bio-medical research including clinical trials.
You can install the released version of chest from CRAN with:
library(chest)
library(ggplot2)
names(diab_df)
#> [1] "Endpoint" "mid" "Diabetes" "Age" "Sex" "BMI"
#> [7] "Married" "Smoke" "CVD" "Cancer" "Education" "Income"
#> [13] "t0" "t1"
A data frame ‘diab_df’ is used to examine the association between
Diabetes
and mortality Endpoint
. The purpose
of using this data set is to demonstrate the use of the functions in
this package rather than answering any research questions.
‘chest_glm’ is slow. We can use indicate = TRUE
to
monitor the progress.