openpharma / brms.mmrm

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

A single unifying attribute in the formula to detect subgroup usage #98

Closed wlandau closed 5 months ago

wlandau commented 5 months ago

Currently we check a bunch of attributes to detect if there is a subgroup in the model:

https://github.com/openpharma/brms.mmrm/blob/a9581e71e9ed86a25003160082ae234ff8f1ea8b/R/brm_formula.R#L491-L501

These specific attributes may vary from case to case in #96. We should define one unifying property to detect this.

wlandau commented 5 months ago

On second thought, it would probably be cleaner to make brm_formula_has_subgroup() an S3 generic.