post_design: Explore your design

Description Usage Arguments Examples

Description

Explore your design

Print code to recreate a design

Usage

1
print_code(design)

Arguments

design

A design object, typically created using the + operator

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
design <-
  declare_population(N = 500, noise = rnorm(N)) +
  declare_potential_outcomes(Y ~ noise + Z * rnorm(N, 2, 2)) +
  declare_sampling(n = 250) +
  declare_estimand(ATE = mean(Y_Z_1 - Y_Z_0)) +
  declare_step(dplyr::mutate, noise_sq = noise^2) +
  declare_assignment(m = 25) +
  declare_reveal() +
  declare_estimator(Y ~ Z, estimand = "my_estimand")

design

df <- draw_data(design)

estimates <- draw_estimates(design)
estimands <- draw_estimands(design)

print_code(design)


my_population <- declare_population(N = 100)

my_assignment <- declare_assignment(m = 50)

my_design <- my_population + my_assignment

print_code(my_design)

DeclareDesign/ddoldversion documentation built on Oct. 30, 2019, 5:17 p.m.