Skip to contents

Runs the design once and returns its estimates joined to inquiries.

Usage

draw_estimates(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 estimates from 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.

See also

Examples

design <- declare_model(N = 30, U = rnorm(N), Y = U) +
  declare_inquiry(mu = mean(Y)) +
  declare_estimator(Y ~ 1, .method = lm, term = "(Intercept)",
                    inquiry = "mu", label = "ols")
draw_estimates(design)
#> # A tibble: 1 × 10
#>   term        estimate std.error statistic p.value conf.low conf.high estimator
#>   <chr>          <dbl>     <dbl>     <dbl>   <dbl>    <dbl>     <dbl> <chr>    
#> 1 (Intercept)   0.0405     0.182     0.223   0.825   -0.331     0.412 ols      
#> # ℹ 2 more variables: inquiry <chr>, estimand <dbl>