# NOT RUN {
# use longitudinal data in healthy controls as pseudo "test-retest"
data <- adnimerge %>%
dplyr::filter(
VISCODE %in% c('bl' ,'m06', 'm12'),
DX_bl == 'CU'
)
# fit model over two groups and two endpoints
model <- data %>% aba_model() %>%
set_groups(
everyone(),
CSF_ABETA_STATUS_bl == 1,
labels = c('CU', 'CU AB-')
) %>%
set_outcomes(
ADAS13, MMSE,
labels = c('ADAS13', 'MMSE')
) %>%
set_stats(
stat_retest(id = 'RID', time = 'VISCODE')
) %>%
aba_fit()
# summarise model to get bias and variance estimates
model_summary <- model %>% aba_summary()
# plot model results like any other summary
g <- model_summary %>% aba_plot_coef(
x='term', group='group', facet=c('outcome','predictor'), coord_flip=TRUE
)
# }
Run the code above in your browser using DataLab