`finalfit`

model wrapper`R/glmmultiboot.R`

`glmmulti_boot.Rd`

Using `finalfit`

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

glmmulti_boot(.data, dependent, explanatory, R = 1000)

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

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

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

R | Number of draws. |

A multivariable `glm`

fitted model with
bootstrapped confidence intervals. Output is of class `glmboot`

.

Uses `glm`

with `finalfit`

modelling conventions.
`boot::boot`

is used to draw bootstrapped confidence
intervals on fixed effect model coefficients. Output can be passed to
`fit2df`

.

Other `finalfit`

model wrappers: `coxphmulti`

,
`coxphuni`

, `glmmixed`

,
`glmmulti`

, `glmuni`

,
`lmmixed`

, `lmmulti`

,
`lmuni`

library(finalfit) library(dplyr) ## Note number of draws set to 100 just for speed in this example explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor") dependent = "mort_5yr" colon_s %>% glmmulti_boot(dependent, explanatory, R=100) %>% fit2df(estimate_suffix="(multivariable (BS CIs))")#> explanatory OR(multivariable (BS CIs)) #> 2 age.factor40-59 years 0.57 (0.25-1.03, p=0.060) #> 3 age.factor60+ years 0.81 (0.41-1.35, p=0.580) #> 4 sex.factorMale 0.98 (0.73-1.17, p=0.580) #> 5 obstruct.factorYes 1.25 (0.92-1.80, p=0.140) #> 6 perfor.factorYes 1.12 (0.54-2.82, p=0.720)