6 Combining univariate and multivariable models
To display both models in a single table run the rm_uvsum and rm_mvsum functions with tableOnly=TRUE and combine.
uvsumTable <- rm_uvsum(data=pembrolizumab, response='orr',
covs=c('age','sex','pdl1','change_ctdna_group'),tableOnly = TRUE)
glm_fit <- glm(orr~change_ctdna_group+pdl1,
family='binomial',
data = pembrolizumab)
mvsumTable <- rm_mvsum(glm_fit, showN = TRUE,tableOnly = TRUE)
rm_uv_mv(uvsumTable,mvsumTable)| Unadjusted OR(95%CI) | p | Adjusted OR(95%CI) | p (adj) | |
|---|---|---|---|---|
| age | 0.96 (0.91, 1.00) | 0.089 | ||
| sex | 0.11 | |||
| Female | Reference | |||
| Male | 0.41 (0.13, 1.22) | |||
| pdl1 | 0.97 (0.95, 0.98) | <0.001 | 0.98 (0.96, 1.00) | 0.024 |
| change ctdna group | 0.002 | 0.004 | ||
| Decrease from baseline | Reference | Reference | ||
| Increase from baseline | 28.74 (5.20, 540.18) | 24.71 (2.87, 212.70) |
Note: This can also be done with adjusted p-values, but when combined the raw p-values are dropped.
uvsumTable <- rm_uvsum(data=pembrolizumab, response='orr',
covs=c('age','sex','pdl1','change_ctdna_group'),tableOnly = TRUE,p.adjust='holm')
glm_fit <- glm(orr~change_ctdna_group+pdl1,
family='binomial',
data = pembrolizumab)
mvsumTable <- rm_mvsum(glm_fit,tableOnly = TRUE,p.adjust='holm')
rm_uv_mv(uvsumTable,mvsumTable)| Unadjusted OR(95%CI) | p | Adjusted OR(95%CI) | p (adj) | |
|---|---|---|---|---|
| age | 0.96 (0.91, 1.00) | 0.18 | ||
| sex | 0.18 | |||
| Female | Reference | |||
| Male | 0.41 (0.13, 1.22) | |||
| pdl1 | 0.97 (0.95, 0.98) | <0.001 | 0.98 (0.96, 1.00) | 0.024 |
| change ctdna group | 0.005 | 0.007 | ||
| Decrease from baseline | Reference | Reference | ||
| Increase from baseline | 28.74 (5.20, 540.18) | 24.71 (2.87, 212.70) |