You might be able to do this with blocking features in randomizr, but I found it easier to write a custom assignment function.
I read your story problem as doing complete RA over weeks 1-4, and then when the week # matched the assignment, do treatment (Z=1).
require(DeclareDesign)
#> Loading required package: DeclareDesign
#> Loading required package: randomizr
#> Loading required package: fabricatr
#> Loading required package: estimatr
p <- declare_population(
subjects=add_level(N=10, s_i=1:N),
months=add_level(N=12),
weeks=add_level(N=4, w_i=1:4)
)
a <- declare_assignment(handler=function(data){
g <- complete_ra(max(data$s_i), conditions=1:4)
within(data, Z <- +(g[s_i] == w_i))
})
design <- p+a
xtabs(~w_i+s_i, draw_data(design), subset = Z == 1)
#> s_i
#> w_i 1 2 3 4 5 6 7 8 9 10
#> 1 0 12 0 0 0 0 0 0 0 12
#> 2 12 0 0 12 0 0 12 0 0 0
#> 3 0 0 0 0 12 0 0 12 12 0
#> 4 0 0 12 0 0 12 0 0 0 0
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.