Treatment effect formula

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start by reading pmrm_model_slowing and the current individual model functions to understand how treatment effects are parameterized. Review reformulas as a possible reference for formula processing; done would mean a documented general treatment-formula interface that supports the stated alternative parametrizations and special formula items.

Written by the indexing model from the issue text.

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 + 0

where 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.

Dominant language
R
Stars
6
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openpharma/pmrm

All issues in openpharma/pmrm

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.