coxphuni | R Documentation |
finalfit
model wrapperUsing finalfit
conventions, produces multiple univariable Cox Proportional Hazard
regression models for a set of explanatory variables against a survival object.
coxphuni(.data, dependent, explanatory)
.data |
Data frame. |
dependent |
Character vector of length 1: name of survival object in form |
explanatory |
Character vector of any length: name(s) of explanatory variables. |
Uses coxph
with finalfit
modelling conventions. Output can be
passed to fit2df
.
A list of univariable coxph
fitted model outputs.
Output is of class coxphlist
.
fit2df, finalfit_merge
Other finalfit model wrappers:
coxphmulti()
,
crrmulti()
,
crruni()
,
glmmixed()
,
glmmulti_boot()
,
glmmulti()
,
glmuni()
,
lmmixed()
,
lmmulti()
,
lmuni()
,
svyglmmulti()
,
svyglmuni()
# Cox Proportional Hazards univariable analysis.
library(finalfit)
library(dplyr)
explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = "Surv(time, status)"
colon_s %>%
coxphuni(dependent, explanatory) %>%
fit2df()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.