-
Notifications
You must be signed in to change notification settings - Fork 2
Description
From @larslau:
Idea for a future release: If we enable the use of a formula for specifying treatment effects, we may end up with much richer functionality of
pmrm_model_slowing.Right now, the formula seems to be: ~ arm_active_1_dummy : visit + ... + arm_active_k_dummy : visit + 0.
If the user can specify the formula, it would enable e.g. a proportional slowing model using the same framework (formula: ~ arm_active_1_dummy + ... + arm_active_k_dummy + 0) or other parametrizations, including the same proportional slowing shared over multiple visits, but potentially changing over different trial periods. Or interaction analyses where slowing depends on baseline characteristics.
A general formula interface could replace a lot of the arguments to the current functions:
formula = y ~ spline_slowing(time) + covariates + us(visit | subject_id), treatment_formula = ~ treatment_group : visit + 0where special formula items (e.g. spline_slowing and spline_decline) are recognized similar to how covariances are recognized in the mmrm package.
This would be nice for a future release. Currently, each model has its own individual function, even though the models are not very different. And we only provide a cell means parameterization for the treatment effect.
@kaskr mentioned https://github.com/bbolker/reformulas, a new package for processing model formulas.