Skip to contents

Runs the design once and returns one row per estimate, with the realized estimands joined on. This is one simulation: simulate_design(sims = 1) without the sim_ID column.

Usage

run_design(design, ...)

Arguments

design

(required) A design.

...

(optional) Named parameter values, as in redesign(). Each supplies one value: use redesign() itself to sweep over several. A parameter named design, or any prefix of it, cannot be supplied this way and needs the redesign() route.

Value

The result of one run: a tibble with one row per estimate: the tidied columns (term, estimate, std.error, p.value, conf.low, conf.high, and so on), estimator, and, where an estimator names an inquiry, inquiry and the realized estimand. A design with no estimator returns its estimands instead, as draw_estimands() does.

Details

Use draw_data() for the realized data frame, draw_estimands() for the inquiries alone, and draw_estimates() for the estimates alone.

See also

Examples

design <- declare_model(N = 30, U = rnorm(N), Y = U) +
  declare_inquiry(mu = mean(Y))
run_design(design)
#> # A tibble: 1 × 2
#>   inquiry estimand
#>   <chr>      <dbl>
#> 1 mu         0.309