Running examples in ‘aba-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: stat_ancova
> ### Title: Create an ancova stat object.
> ### Aliases: stat_ancova
> 
> ### ** Examples
> 
> # filter to 24 month visit; calculate change in cognition to use as outcome;
> # assume abeta status as "treatment" variable.
> # The goal is to see if "treatment" has an effect on 2y cognitive decline
> data <- adnimerge %>%
+   dplyr::filter(
+     VISCODE == 'm24',
+     DX_bl %in% c('MCI', 'AD'),
+     !is.na(CSF_ABETA_STATUS_bl)
+   ) %>%
+   dplyr::mutate(
+     CDRSB = CDRSB - CDRSB_bl,
+     ADAS13 = ADAS13 - ADAS13_bl,
+     TREATMENT = factor(CSF_ABETA_STATUS_bl, levels=c(1,0),
+                        labels=c('Placebo','Treatment'))
+   )
> 
> # fit model. note that baseline outcome will be added based on the suffix.
> # e.g., fits with "CDRSB" as outcome will also add "CDRSB_bl" to the formula.
> ancova_model <- data %>% aba_model() %>%
+   set_outcomes(CDRSB, ADAS13) %>%
+   set_covariates(AGE, GENDER, EDUCATION) %>%
+   set_stats(
+     stat_ancova(treatment = 'TREATMENT', baseline_suffix = 'bl')
+   ) %>%
+   fit()
> 
> # summarise model. treatment effect will be shown in the treatment coefficient
> ancova_summary <- ancova_model %>% summary()
Error in `mutate()`:
! Problem while computing `metrics = purrr::map2(...)`.
Caused by error in `loadNamespace()`:
! there is no package called ‘psychometric’
Backtrace:
     ▆
  1. ├─ancova_model %>% summary()
  2. ├─base::summary(.)
  3. ├─aba:::summary.abaModel(.)
  4. │ └─object %>% aba_summary(...)
  5. ├─aba::aba_summary(., ...)
  6. │ └─object %>% calculate_metrics(control)
  7. ├─aba:::calculate_metrics(., control)
  8. │ └─r %>% ...
  9. ├─dplyr::mutate(...)
 10. ├─dplyr:::mutate.data.frame(...)
 11. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
 12. │   ├─base::withCallingHandlers(...)
 13. │   └─mask$eval_all_mutate(quo)
 14. ├─purrr::map2(...)
 15. │ └─aba .f(.x[[i]], .y[[i]], ...)
 16. │   ├─... %>% mutate(term = tolower(term))
 17. │   ├─aba:::aba_glance(model, basic_model)
 18. │   └─aba:::aba_glance.lm(model, basic_model)
 19. ├─dplyr::mutate(., term = tolower(term))
 20. ├─dplyr::arrange(., match(term, metric_vars))
 21. ├─dplyr::rename(., conf_low = conf.low, conf_high = conf.high)
 22. ├─dplyr::filter(., term %in% metric_vars)
 23. ├─base::loadNamespace(x)
 24. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
 25. │ │ └─base withOneRestart(expr, restarts[[1L]])
 26. │ │   └─base doWithOneRestart(return(expr), restart)
 27. │ └─base::stop(cond)
 28. └─dplyr `<fn>`(`<pckgNtFE>`)
 29.   └─rlang::abort(...)
Execution halted