`finalfit`

model wrapper`R/coxphuni.R`

`coxphuni.Rd`

Using `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 | Dataframe. |
---|---|

dependent | Character vector of length 1: name of survival object in form |

explanatory | Character vector of any length: name(s) of explanatory variables. |

A list of univariable `coxph`

fitted model outputs.
Output is of class `coxphlist`

.

Uses `coxph`

with `finalfit`

modelling conventions. Output can be
passed to `fit2df`

.

Other `finalfit`

model wrappers: `coxphmulti`

,
`glmmixed`

, `glmmulti_boot`

,
`glmmulti`

, `glmuni`

,
`lmmixed`

, `lmmulti`

,
`lmuni`

# 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()#> explanatory HR #> 1 age.factor40-59 years 0.76 (0.53-1.09, p=0.132) #> 2 age.factor60+ years 0.93 (0.66-1.31, p=0.668) #> 3 sex.factorMale 1.01 (0.84-1.22, p=0.888) #> 4 obstruct.factorYes 1.29 (1.03-1.62, p=0.028) #> 5 perfor.factorYes 1.17 (0.70-1.95, p=0.556)