Text Summary of a Design

# S3 method for design
summary(object, ...)

Arguments

object

a design object created by declare_design

...

optional arguments to be sent to summary function

Examples

my_population <- declare_population(N = 500, noise = rnorm(N)) my_potential_outcomes <- declare_potential_outcomes( Y_Z_0 = noise, Y_Z_1 = noise + rnorm(N, mean = 2, sd = 2)) my_sampling <- declare_sampling(n = 250) my_assignment <- declare_assignment(m = 25) my_estimand <- declare_estimand(ATE = mean(Y_Z_1 - Y_Z_0)) my_estimator <- declare_estimator(Y ~ Z, estimand = my_estimand) design <- declare_design(my_population, my_potential_outcomes, my_sampling, my_estimand, dplyr::mutate(noise_sq = noise^2), my_assignment, reveal_outcomes, my_estimator) summary(design)
#> #> Design Summary #> #> Step 1 (population): declare_population(N = 500, noise = rnorm(N)) ------------- #> #> N = 500 #> #> Added variable: ID #> N_missing N_unique class #> 0 500 character #> #> Added variable: noise #> min median mean max sd N_missing N_unique #> -2.72 -0.1 -0.1 2.89 0.99 0 500 #> #> Step 2 (potential outcomes): declare_potential_outcomes(Y_Z_0 = noise, Y_Z_1 = noise + rnorm(N, mean = 2, sd = 2)) #> #> Added variable: Y_Z_0 #> min median mean max sd N_missing N_unique #> -2.72 -0.1 -0.1 2.89 0.99 0 500 #> #> Added variable: Y_Z_1 #> min median mean max sd N_missing N_unique #> -5.23 1.85 1.85 8.4 2.27 0 500 #> #> Step 3 (sampling): declare_sampling(n = 250) ----------------------------------- #> #> N = 250 (250 subtracted) #> #> Added variable: S_inclusion_prob #> 0.5 #> 250 #> 1.00 #> #> Altered variable: ID #> Before: #> N_missing N_unique class #> 0 500 character #> #> After: #> N_missing N_unique class #> 0 250 character #> #> Altered variable: noise #> Before: #> min median mean max sd N_missing N_unique #> -2.72 -0.1 -0.1 2.89 0.99 0 500 #> #> After: #> min median mean max sd N_missing N_unique #> -2.72 -0.11 -0.16 2.38 0.98 0 250 #> #> Altered variable: Y_Z_0 #> Before: #> min median mean max sd N_missing N_unique #> -2.72 -0.1 -0.1 2.89 0.99 0 500 #> #> After: #> min median mean max sd N_missing N_unique #> -2.72 -0.11 -0.16 2.38 0.98 0 250 #> #> Altered variable: Y_Z_1 #> Before: #> min median mean max sd N_missing N_unique #> -5.23 1.85 1.85 8.4 2.27 0 500 #> #> After: #> min median mean max sd N_missing N_unique #> -4.39 1.94 1.96 8.4 2.21 0 250 #> #> Step 4 (estimand): declare_estimand(ATE = mean(Y_Z_1 - Y_Z_0)) ----------------- #> #> A single draw of the estimand: #> estimand_label estimand #> ATE 2.118752 #> #> Step 5 (wrapped): ~dplyr::mutate(noise_sq = noise^2) --------------------------- #> #> Added variable: noise_sq #> min median mean max sd N_missing N_unique #> 0 0.51 0.98 7.42 1.26 0 250 #> #> Step 6 (assignment): declare_assignment(m = 25) -------------------------------- #> #> Added variable: Z #> 0 1 #> 225 25 #> 0.90 0.10 #> #> Added variable: Z_cond_prob #> 0.1 0.9 #> 25 225 #> 0.10 0.90 #> #> Step 7 (reveal outcomes): reveal_outcomes() ------------------------------------ #> #> Added variable: Y #> min median mean max sd N_missing N_unique #> -4.39 -0.06 0 7.03 1.32 0 250 #> #> Step 8 (estimator): declare_estimator(Y ~ Z, estimand = my_estimand) ----------- #> #> Formula: Y ~ Z #> #> A single draw of the estimator: #> estimator_label coefficient_name est se p ci_lower #> my_estimator Z 1.25822 0.566097 0.03565853 0.09145012 #> ci_upper estimand_label #> 2.424989 ATE #>