aba_plot_predictor_risk | R Documentation |
This function plots real predictor values versus predicted risk (either absolute or relative) from a fitted aba model with glm stats.
aba_plot_predictor_risk(model, term_labels = NULL)
model |
fitted abaModel. The model to plot |
term_labels |
list. Names and values of predictors and their labels to replace them with in the plot. |
a ggplot
data <- adnimerge %>% dplyr::filter(VISCODE == 'bl')
# fit glm model with binary outcome variables
model <- data %>% aba_model() %>%
set_groups(everyone()) %>%
set_outcomes(CSF_ABETA_STATUS_bl) %>%
set_predictors(
c(PLASMA_ABETA_bl, PLASMA_PTAU181_bl, PLASMA_NFL_bl)
) %>%
set_stats(
stat_glm(std.beta = FALSE)
) %>%
fit()
g <- model %>% aba_plot_predictor_risk()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.