You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For MMRMs that analyze raw response (instead of change from baseline), there is sometimes a desire to do what my colleagues call a "constrained longitudinal data analysis" (cLDA) where all treatment groups are pooled at baseline. The rationale is that since baseline is measured prior to dosing, we should really be observing differences among study arms yet.
For models with continuous time, this is easy to parameterize in the formula. For example, the model y ~ time + time:group automatically sets all groups equal at time = 0. But for discrete time models like MMRMs, the formula cannot help us in the same way.
The only implementation strategy that comes to mind is to manually set all groups to placebo at baseline. For the FEV data, this would look like:
suppressPackageStartupMessages(library(dplyr))
data(fev_data, package="mmrm")
fev_data<-fev_data|>
mutate(ARMCD= as.character(ARMCD), AVISIT= as.character(AVISIT))
distinct(fev_data, ARMCD, AVISIT)
#> ARMCD AVISIT#> 1 TRT VIS1#> 2 TRT VIS2#> 3 TRT VIS3#> 4 TRT VIS4#> 5 PBO VIS1#> 6 PBO VIS2#> 7 PBO VIS3#> 8 PBO VIS4clda_data<-fev_data|>
mutate(ARMCD= ifelse(AVISIT=="VIS1", "PBO", ARMCD))
distinct(clda_data, ARMCD, AVISIT)
#> ARMCD AVISIT#> 1 PBO VIS1#> 2 TRT VIS2#> 3 TRT VIS3#> 4 TRT VIS4#> 5 PBO VIS2#> 6 PBO VIS3#> 7 PBO VIS4
Then the analysis would proceed as usual on the transformed data:
lm(FEV1~ARMCD*AVISIT, data=clda_data)
Is there anything wrong with this approach? I feel like it may be frowned upon because it changes the data and not the model, but it's extremely convenient in all sorts of ways.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For MMRMs that analyze raw response (instead of change from baseline), there is sometimes a desire to do what my colleagues call a "constrained longitudinal data analysis" (cLDA) where all treatment groups are pooled at baseline. The rationale is that since baseline is measured prior to dosing, we should really be observing differences among study arms yet.
For models with continuous time, this is easy to parameterize in the formula. For example, the model
y ~ time + time:group
automatically sets all groups equal at time = 0. But for discrete time models like MMRMs, the formula cannot help us in the same way.The only implementation strategy that comes to mind is to manually set all groups to placebo at baseline. For the FEV data, this would look like:
Created on 2024-06-07 with reprex v2.1.0
Then the analysis would proceed as usual on the transformed data:
Is there anything wrong with this approach? I feel like it may be frowned upon because it changes the data and not the model, but it's extremely convenient in all sorts of ways.
Beta Was this translation helpful? Give feedback.
All reactions