How could one create a longnitudal Design with DeclareDesign with repeated interventions and measurement?

For example, if one would have two groups (treatment & placebo) and every unit would receive either the treatment or the placebo once a month over a duration of X-months. And one would spread the intervention in 4 blocks (by week of the month), so that the first block receives the treatment or placebo in the first week of the month, second block in the second week and so on. Imagine one could measure every unit, every week, starting one week before the intervention until X-months after the last intervention took place.

^{Created on 2019-08-29 by the reprex package (v0.3.0)}

The rest of the design (potential outcomes, estimands and estimation, revealing outcomes, …) should be pretty standard. There’s a couple redundant columns in my design above, but those coudl be cleaned up easily.

You can add extra conditions in the assignment function too (eg no more treatments after month 6, for example). You could also filter down the output to only observe weeks one week before first treatment through X months after final treatment.

thanks a lot. In this design, every unit would receive a treatment at some point. One would also need to declare another assignment to differentiate between placebo and treatment, or?

To me the rest does not look too easy. Let’s assume the outcome is some normal distributed variable over all units, that increase slowly over time with a normal distribution each week for all units. Additionally the outcome in the treatment group should increase additionally in the week of treatment and in the week after the treatment, thereafter decreasing again for two weeks (but slightly less than it did increase) until the treatment is repeated (picture it like an upward wave).