
Please note: 'chest_glm'
is used to assess confounding effects using
Generalized Linear Models, such as
logistic regression and Poisson regression with 'glm'
.
It presents odds ratios or rate ratios for the association
between exposure and outcome variables by adding other variables (potential
confounders) to the model sequentially. The order of variables to be added is
based on the magnitudes of the changes in effect estimates.
chest_glm(
crude,
xlist,
data,
family = "binomial",
method = "glm.fit",
na_omit = TRUE,
indicate = FALSE,
plus = " + ",
...
)
A table with effect estimates and their changes at all steps.
An object of formula for initial model, generally crude model. However, any other variables can also be included here as the initial model.
A vector of characters with all variable names of potential confounders.
Data frame.
Description of the error distribution. Default is "binomial".
Method to detect for singularity.
Remove all missing values, default: 'na_omit = TRUE'.
indicate progress.
Change the +
sign before variable names.
Further optional arguments for forestplot.
'glm'
'stats'
chest_glm(
crude = "Endpoint ~ Diabetes", xlist = c("Age", "Sex", "Married"),
na_omit = TRUE, data = diab_df
)
Run the code above in your browser using DataLab