aba_plot_roc | R Documentation |
This function plots ROC curves across group - outcome - stat combinations
and currently supports stat_glm
.
aba_plot_roc(model, drop_facet_labels = FALSE)
model |
abaModel. A fitted aba model with |
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. |
a ggplot with roc curves for all predictor sets across each group - outcome - stat combination
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()
fig <- model %>% aba_plot_roc()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.