chest_cox | R Documentation |
'chest_cox'
is used to assess confounding effects
using Proportional Hazards Regression Model ('coxph'
from 'survival' package).
It presents the effect estimates (such as hazard 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_cox(
crude,
xlist,
data,
na_omit = TRUE,
plus = " + ",
indicate = FALSE,
...
)
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 variable names of potential confounders. |
data |
Data frame. |
na_omit |
Remove all missing values, default: 'na_omit = TRUE'. |
plus |
Change the |
indicate |
indicate the progress. |
... |
Further optional arguments for forestplot. |
A table with effect estimates and their changes at all steps.
'survival'
vlist <- c("Age", "Sex", "Married", "Cancer", "CVD", "Education", "Income")
chest_cox(crude = "Surv(t0, t1, Endpoint) ~ Diabetes", xlist = vlist, data = diab_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.