5 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.
<- rm_uvsum(data=pembrolizumab, response='orr',
uvsumTable covs=c('age','sex','pdl1','change_ctdna_group'),tableOnly = TRUE)
<- glm(orr~change_ctdna_group+pdl1,
glm_fit family='binomial',
data = pembrolizumab)
<- rm_mvsum(glm_fit, showN = TRUE,tableOnly = TRUE)
mvsumTable
rm_uv_mv(uvsumTable,mvsumTable)
Unadjusted OR(95%CI) | N | p | Adjusted OR(95%CI) | N (adj) | p (adj) | |
---|---|---|---|---|---|---|
age | 0.96 (0.91, 1.00) | 94 | 0.09 | |||
sex | 94 | 0.11 | ||||
Female | Reference | 58 | ||||
Male | 0.41 (0.13, 1.22) | 36 | ||||
pdl1 | 0.97 (0.95, 0.98) | 93 | <0.001 | 0.98 (0.96, 1.00) | 73 | 0.02 |
change ctdna group | 73 | 0.002 | 73 | 0.004 | ||
Decrease from baseline | Reference | 33 | Reference | 33 | ||
Increase from baseline | 28.74 (5.20, 540.18) | 40 | 24.71 (2.87, 212.70) | 40 |
Note: This can also be done with adjusted p-values, but when combined the raw p-values are dropped.