5 Multivariable analysis

To create a nice display for multivariable models the multivariable model first needs to be fit.

By default, the variance inflation factor will be shown to check for multicollinearity. To suppress this column set vif=FALSE. Note: variance inflation factors are not computed (yet) for multilevel or GEE models.

glm_fit <- glm(orr~change_ctdna_group+pdl1+age,
               family='binomial',
               data = pembrolizumab)
rm_mvsum(glm_fit, showN = TRUE, vif=TRUE)
OR(95%CI) p-value N Event VIF
change ctdna group 0.006 73 58 1.03
Decrease from baseline Reference 33 19
Increase from baseline 23.92 (2.49, 229.77) 40 39
pdl1 0.97 (0.95, 0.99) 0.011 73 58 1.24
age 0.94 (0.87, 1.01) 0.078 73 58 1.23

p-values can be adjusted for multiple comparisons using any of the options available in the p.adjust function. This argument is also available for univariate models run with rm_uvsum.

rm_mvsum(glm_fit, showN = TRUE, vif=TRUE,p.adjust = 'holm')
OR(95%CI) p-value N Event VIF
change ctdna group 0.018 73 58 1.03
Decrease from baseline Reference 33 19
Increase from baseline 23.92 (2.49, 229.77) 40 39
pdl1 0.97 (0.95, 0.99) 0.022 73 58 1.24
age 0.94 (0.87, 1.01) 0.078 73 58 1.23