Skip to contents

Conditional treatment is different to nested units as the levels are assumed to be distinct for the latter but not for the former.

Usage

nested_in(x, ...)

conditioned_on(x, ...)

Arguments

x

The name of the parent unit to nest under.

...

a single number OR a sequence of two-sided formula where the left-hand side corresponds to the name of the level (or the level number) of x and the right-hand side is an integer specifying the number of levels nested under the corresponding levels.

Value

A nested level.

Details

Currently when specifying conditional treatment, only character vectors are accepted on the RHS.

See also

See set_units() for examples of how to use this.

Examples

design("Split-Plot Design | Split-Unit Design") %>%
  set_units(mainplot = 60,
            subplot = nested_in(mainplot, 10))
#> Split-Plot Design | Split-Unit Design
#> └─mainplot (60 levels)
#>   └─subplot (600 levels)