Diagnose the Design

diagnose_design(..., diagnosands = default_diagnosands, sims = 500)

Arguments

...

A design created by declare_design, or a set of designs. You can also provide a single list of designs, for example one created by quick_design.

diagnosands

A set of diagnosands created by declare_diagnosands. By default, these include bias, root mean-squared error, power, frequentist coverage, the mean and standard deviation of the estimate(s), the "type S" error rate (Gelman and Carlin 2014), and the mean of the estimand(s).

sims

The number of simulations, defaulting to 500.

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_assignment <- declare_assignment() 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_estimand, my_assignment, reveal_outcomes, my_estimator) # using built-in defaults: diagnosis <- diagnose_design(design) diagnosis
#> #> Research design diagnosis #> #> Estimand Label Estimator Label Bias Rmse Power Coverage #> ATE my_estimator 0.002785162 0.1239394 1 0.982 #> Mean Estimate Sd Estimate Type S Rate Mean Estimand #> 2.007155 0.1557829 0 2.00437 #>
# using a user-defined diagnosand my_diagnosand <- declare_diagnosands(absolute_error = mean(abs(est - estimand))) diagnosis <- diagnose_design(design, diagnosands = my_diagnosand) diagnosis
#> #> Research design diagnosis #> #> Estimand Label Estimator Label Absolute Error #> ATE my_estimator 0.09954615 #>