Add an application vignette
Opened this issue · 6 comments
To do:
- Add a new vignette showcasing a practical application of
mmrm
- Include usage of
emmeans
(going beyond what we have already in the introduction vignette)
@yonicd I finally added this issue, feel free to add other ideas in the description
Not sure, could be worth a try! I think we had a similar idea (cLDA) in the issues/discussions before
Ref2 has a nice example w gls, it is straight fw. It looks like you need to setup the design matrix a bit manually, but overall easy enough.
i tested out the cLDA formula yesterday.
It is pretty simple.
- pivot longer
fev_data
to include baseline in the FEV and add a VISITN=0 - define the formula as
FEV ~ VISITN + VISITN:ARMCD + us(VISITF|USUBJID)
This notation is analogous to a design matrix that does not include the ARMCD as a variable but does include VISITN and the interaction of VISITN*ARMCD.
This design matrix aligns with the model assumption:
In cLDA, the group means are assumed to be equal at baseline (hence the “constrained” in cLDA), which is a reasonable assumption in a randomized trial. As described below, this strategy is an important exception of the rule that an interaction should not be included in a model without its main effects.
One of the motivations of this design is when there is missingness in the baseline, in such cases in the standard mmrm formula those rows would be dropped since FEV_BL is missing.
@danielinteractive I think then maybe it would be worth to have a version of data with missingness in baseline to show how mmrm and clda could yield different inferential results, what do you think?
Thanks @yonicd for digging into this, much appreciated!
Yeah, I think that modified version could be created inside the vignette to demonstrate this.