Run a design one time

run_design(design)

Arguments

design

a DeclareDesign object

Examples

design <-
  declare_model(
    N = 100, X = rnorm(N),
    potential_outcomes(Y ~ (.25 + X) * Z + rnorm(N))
  ) +
  declare_inquiry(ATE = mean(Y_Z_1 - Y_Z_0)) +
  declare_assignment(Z = complete_ra(N, m = 50)) +
  declare_measurement(Y = reveal_outcomes(Y ~ Z)) + 
  declare_estimator(Y ~ Z, inquiry = "ATE")

run_design(design)
#>   inquiry  estimand estimator term  estimate std.error statistic   p.value
#> 1     ATE 0.1271281 estimator    Z 0.1645493 0.2361333 0.6968492 0.4875468
#>     conf.low conf.high df outcome
#> 1 -0.3040495 0.6331481 98       Y