Learn R Programming

aba (version 0.0.9)

aba_plot_roc: Plot ROC curves from an aba model

Description

This function plots ROC curves across group - outcome - stat combinations and currently supports stat_glm.

Usage

aba_plot_roc(object)

Arguments

object

abaSummary. A summary of an aba model with stat_glm type.

Value

a ggplot with roc curves for all predictor sets across each group - outcome - stat combination

Examples

Run this code
# NOT RUN {
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()

# summarise glm model
model_summary <- model %>% summary()

fig <- model_summary %>% aba_plot_roc()

# }

Run the code above in your browser using DataLab