aba_plot_trajectory | R Documentation |
level=0: group-level estimates level=1: individual-level estimates level=2: individual-level observations
aba_plot_trajectory(
model,
time_at = NULL,
at = NULL,
expand = NULL,
reduce_fn = mean,
include_ranef = FALSE,
time_label = "Time",
outcome_label = "Outcome",
include_basic = TRUE
)
level |
data <- aba::adnimerge %>%
filter(
AGE > 20,
YEARS_bl <= 3.5,
DX_bl == 'MCI'
)
data_bl <- data %>% filter(VISCODE == 'bl')
model <- data %>%
aba_model() %>%
set_outcomes(ADAS13, CDRSB) %>%
set_predictors(c(AGE, CSF_ABETA_bl)) %>%
set_stats(
stat_lme(id = 'RID', time = 'YEARS_bl', poly=2)
) %>%
fit()
model %>%
aba_plot_trajectory(
time_at=seq(0,3,length.out=20)
)
model %>%
aba_plot_trajectory(
time_at=seq(0,3,length.out=20),
include_ranef = T
)
# two different stats
model <- data %>%
aba_model() %>%
set_outcomes(ADAS13, CDRSB) %>%
set_predictors(c(AGE, CSF_ABETA_bl)) %>%
set_stats(
stat_lme(id = 'RID', time = 'YEARS_bl'),
stat_lme(id = 'RID', time = 'YEARS_bl', poly=2)
) %>%
fit()
# two different stats
model %>%
aba_plot_trajectory(
time_at=seq(0,3,length.out=20),
include_ranef = T
)
# two stats and "at" vars
model %>%
aba_plot_trajectory(
time_at=seq(0,3,length.out=20),
include_ranef = T,
at = list('AGE'=c(50,80))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.