openpharma / brms.mmrm

R package to run Bayesian MMRMs using {brms}
https://openpharma.github.io/brms.mmrm/
Other
18 stars 2 forks source link

Imputation of missing outcomes #122

Closed wlandau closed 2 months ago

wlandau commented 2 months ago

Fixes #121:

  1. Add a new imputed argument to accept a mice multiply imputed dataset ("mids") in brm_model()
  2. Add a new model_missing_outcomes in brm_formula() to optionally impute missing values during model fitting as described at https://paul-buerkner.github.io/brms/articles/brms_missings.html.

Unfortunately the first commit of #121 accidentally reached the main branch (https://github.com/openpharma/brms.mmrm/commit/3afee8dd3e5556e7ff2f1771cd2fc48a69516579) but I will merge this PR soon to return the package to a consistent state.

wlandau commented 2 months ago

This integration still seems nice to have, but I do not actually know how the appropriate way to use mice on tidy long multivariate datasets like ours: https://github.com/amices/mice/discussions/655

wlandau commented 2 months ago

Turns out brms also accepts a general list of imputed data frames. Shifted the focus there in acd8b2ea509737ab654336b8529fdb17bdb25790 and suggested https://insightsengineering.github.io/rbmi/main/ in the docs.