aba_plot_roc: Plot ROC curves from an aba model

Description Usage Arguments Value Examples

View source: R/stat_glm.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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()

aba documentation built on Dec. 17, 2021, 1:06 a.m.