# NOT RUN {
# fit aba model
model <- aba_model() %>%
set_data(adnimerge %>% dplyr::filter(VISCODE == 'bl')) %>%
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 aba model to calculate metrics
model_summary <- model %>% aba_summary()
# plot the coefficients using default
coef_plot <- model_summary %>% aba_plot_coef(coord_flip=TRUE)
# compare predictor coefficients across outcomes
coef_plot2 <- model_summary %>%
aba_plot_coef(
x = 'outcome', group='predictor',
facet=c('term','group'), coord_flip=TRUE
)
# }
Run the code above in your browser using DataLab