`finalfit`

model wrapper`R/glmuni.R`

`glmuni.Rd`

Using `finalfit`

conventions, produces multiple univariable binomial logistic
regression models for a set of explanatory variables against a binary dependent.

glmuni(.data, dependent, explanatory, family = "binomial", ...)

.data | Data frame. |
---|---|

dependent | Character vector of length 1: name of depdendent variable (must have 2 levels). |

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

family | Character vector quoted or unquoted of the error distribution
and link function to be used in the model, see |

... | Other arguments to pass to |

A list of univariable `glm`

fitted model outputs.
Output is of class `glmlist`

.

Uses `glm`

with `finalfit`

modelling conventions. Output can be
passed to `fit2df`

.

Other `finalfit`

model wrappers: `coxphmulti`

,
`coxphuni`

, `glmmixed`

,
`glmmulti_boot`

, `glmmulti`

,
`lmmixed`

, `lmmulti`

,
`lmuni`

library(finalfit) library(dplyr) explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor") dependent = "mort_5yr" colon_s %>% glmuni(dependent, explanatory) %>% fit2df(estimate_suffix=" (univariable)")#>#>#>#>#> explanatory OR (univariable) #> 1 age.factor40-59 years 0.54 (0.32-0.92, p=0.023) #> 2 age.factor60+ years 0.75 (0.45-1.25, p=0.270) #> 3 sex.factorMale 0.98 (0.76-1.27, p=0.889) #> 4 obstruct.factorYes 1.25 (0.90-1.74, p=0.189) #> 5 perfor.factorYes 1.18 (0.54-2.55, p=0.672)