all_cox {allestimates} | R Documentation |
Estimates all possible effect estimates using Cox Proportional Hazards regression models
Description
Estimates hazard ratios using Proportional Hazards Regression models
("coxph"
from survival package) from models with all
possible combinations of a list of variables.
Usage
all_cox(crude, xlist, data, na_omit = TRUE, ...)
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. The left-hand side of ~ is the outcome of interest, and the variable on the right-hand side of ~ is the exposure of the interest (either a treatment or a risk factor) |
xlist |
A vector of a list of variable names. |
data |
Data frame. |
na_omit |
Remove all missing values. Default is |
... |
Further optional arguments. |
Value
A list of all effect estimates.
See Also
surival
Examples
vlist <- c("Age", "Sex", "Married", "BMI", "Education", "Income")
results <- all_cox(crude = "Surv(t0, t1, Endpoint) ~ Diabetes", xlist = vlist, data = diab_df)
results
[Package allestimates version 0.2.3 Index]