This function adds the edges between variable nodes to specify the mapping of units to treatment. This function does not actually assign specific treatment levels onto actual units.

allot_trts(design, ...)

Arguments

...

One-sided or two-sided formula. If the input is a one-sided formula then the whole treatment is applied to the specified unit.

.data

An edbl_graph object.

See also

Examples

start_design() %>%
  set_units(block = 10,
            plot = nested_in(block, 3)) %>%
  set_trts(treat = c("A", "B", "C"),
           pest = c("a", "b")) %>%
  allot_trts(treat ~ plot,
                pest ~ block)
#> An edibble design
#> ├─block (10 levels)
#> │ └─plot (30 levels)
#> ├─treat (3 levels)
#> └─pest (2 levels)
#> Allotment:
#> 
#> • treat ~ plot
#> • pest ~ block