Draw data, estimates, and estimands from a design
draw_data(design, data = NULL, start = 1, end = length(design)) draw_estimands(...) draw_estimates(...)
design | A design object, typically created using the + operator |
---|---|
data | A data.frame object with sufficient information to get the data, estimates, estimands, an assignment vector, or a sample. |
start | (Defaults to 1) a scalar indicating which step in the design to begin with. By default all data steps are drawn, from step 1 to the last step of the design. |
end | (Defaults to |
... | A design or set of designs typically created using the + operator |
design <- declare_population(N = 100, u = rnorm(N)) + declare_potential_outcomes(Y ~ Z + u) + declare_estimand(ATE = mean(Y_Z_1 - Y_Z_0)) + declare_sampling(n = 75) + declare_assignment(m = 50) + reveal_outcomes(Y, Z) + declare_estimator(Y ~ Z, estimand = "ATE") dat <- draw_data(design) dat_no_sampling <- draw_data(design, end = 3) draw_estimands(design)#> estimand_label estimand #> 1 ATE 1draw_estimates(design)#> estimator_label term estimate std.error statistic p.value conf.low #> 1 estimator Z 1.092634 0.2330144 4.689127 2.161904e-05 0.6245849 #> conf.high df outcome estimand_label #> 1 1.560683 49.8887 Y ATE