This function plots ROC curves across group - outcome - stat combinations
and currently supports stat_glm
.
Arguments
- model
abaModel. A fitted aba model with
stat_glm
type.- drop_facet_labels
logical. Whether to remove facet labels from plots. The facet labels tell you what the group and outcome is for the plot. Sometimes these labels are unnecessary when you have only one group and one outcome, or when you want to add labels in another way.
Value
a ggplot with roc curves for all predictor sets across each group - outcome - stat combination
Examples
data <- adnimerge %>% dplyr::filter(VISCODE == 'bl')
# fit glm model with binary outcome variables
model <- data %>% aba_model() %>%
set_groups(everyone()) %>%
set_outcomes(ConvertedToAlzheimers, CSF_ABETA_STATUS_bl) %>%
set_predictors(
PLASMA_ABETA_bl, PLASMA_PTAU181_bl, PLASMA_NFL_bl,
c(PLASMA_ABETA_bl, PLASMA_PTAU181_bl, PLASMA_NFL_bl)
) %>%
set_stats(
stat_glm(std.beta = TRUE)
) %>%
fit()
#> [1] "ConvertedToAlzheimers ~ PLASMA_ABETA_bl"
#> [1] "ConvertedToAlzheimers ~ PLASMA_PTAU181_bl"
#> [1] "ConvertedToAlzheimers ~ PLASMA_NFL_bl"
#> [1] "ConvertedToAlzheimers ~ PLASMA_ABETA_bl + PLASMA_PTAU181_bl + PLASMA_NFL_bl"
#> [1] "CSF_ABETA_STATUS_bl ~ PLASMA_ABETA_bl"
#> [1] "CSF_ABETA_STATUS_bl ~ PLASMA_PTAU181_bl"
#> [1] "CSF_ABETA_STATUS_bl ~ PLASMA_NFL_bl"
#> [1] "CSF_ABETA_STATUS_bl ~ PLASMA_ABETA_bl + PLASMA_PTAU181_bl + PLASMA_NFL_bl"
fig <- model %>% aba_plot_roc()