Hi Eric!
I think you can think of this in two ways.
You could imagine this is a 9-arm trial:
> design <-
+ declare_population(N = 100) +
+ declare_assignment(num_arms = 9)
>
> dat <- draw_data(design)
> head(dat)
ID Z Z_cond_prob
1 001 T9 0.1111111
2 002 T7 0.1111111
3 003 T3 0.1111111
4 004 T7 0.1111111
5 005 T3 0.1111111
6 006 T3 0.1111111
> with(dat, table(Z))
Z
T1 T2 T3 T4 T5 T6 T7 T8 T9
11 11 11 11 11 12 11 11 11
or as first assigning the first factor and then assigning the second factor, blocking on the first
> design <-
+ declare_population(N = 100) +
+ declare_assignment(num_arms = 3, assignment_variable = "F1") +
+ declare_assignment(num_arms = 3,
+ blocks = F1,
+ assignment_variable = "F2")
>
> dat <- draw_data(design)
> head(dat)
ID F1 F1_cond_prob F2 F2_cond_prob
1 001 T1 0.3333333 T2 0.3333333
2 002 T1 0.3333333 T1 0.3333333
3 003 T3 0.3333333 T3 0.3333333
4 004 T1 0.3333333 T1 0.3333333
5 005 T2 0.3333333 T1 0.3333333
6 006 T2 0.3333333 T2 0.3333333
> with(dat, table(F1, F2))
F2
F1 T1 T2 T3
T1 11 11 12
T2 11 11 11
T3 11 11 11
I think the second way might make it easier to write out your expecations about potnetial outcomes and also in the analysis step!