Skip to contents

bound() is a declarative marker used inside the aux argument of draw() with method = "cube". It requests adjacent-integer bounds on the realized sample count for every observed category of x.

Usage

bound(x)

Arguments

x

A single categorical frame variable. Use separate bound() calls for separate marginal constraints.

Value

bound() is only meaningful inside draw(aux = ...) and otherwise throws an informative error.

Examples

sampling_design() |>
  draw(
    n = 100,
    method = "cube",
    aux = c(income, bound(region), bound(urban_rural))
  )
#> ── Sampling Design ─────────────────────────────────────────────────────────────
#> 
#> ℹ 1 stage
#> 
#> ── Stage 1 ─────────────────────────────────────────────────────────────────────
#> • Draw: n = 100, method = cube, aux = income, count bounds = bound(region), bound(urban_rural)
#>