Using `finalfit`

conventions, produces multiple univariable linear
regression models for a set of explanatory variables against a continuous dependent.

lmuni(.data, dependent, explanatory)

.data | Dataframe. |
---|---|

dependent | Character vector of length 1, name of depdendent variable (must be continuous vector). |

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

A list of multivariable `lm`

fitted model outputs.
Output is of class `lmlist`

.

Uses `lm`

with `finalfit`

modelling conventions. Output can be
passed to `fit2df`

.

Other `finalfit`

model wrappers: `coxphmulti`

,
`coxphuni`

, `glmmixed`

,
`glmmulti_boot`

, `glmmulti`

,
`glmuni`

, `lmmixed`

,
`lmmulti`

library(finalfit) library(dplyr) explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor") dependent = "nodes" colon_s %>% lmuni(dependent, explanatory) %>% fit2df()#> explanatory Coefficient #> 2 age.factor40-59 years -1.14 (-2.08 to -0.21, p=0.016) #> 3 age.factor60+ years -1.19 (-2.10 to -0.28, p=0.010) #> 5 sex.factorMale -0.14 (-0.60 to 0.33, p=0.565) #> 7 obstruct.factorYes -0.24 (-0.83 to 0.36, p=0.435) #> 9 perfor.factorYes 0.24 (-1.13 to 1.61, p=0.735)