# NOT RUN {
#Generate a simple two-arm design using default arguments
two_arm_covariate_design <- two_arm_covariate_designer()
# Design with no confounding but a prognostic covariate
prognostic <- two_arm_covariate_designer(N = 40, ate = .2, rho_WY = .9, h = .5)
# }
# NOT RUN {
diagnose_design(prognostic)
# }
# NOT RUN {
# Design with confounding
confounding <- two_arm_covariate_designer(N = 40, ate = 0, rho_WZ = .9, rho_WY = .9, h = .5)
# }
# NOT RUN {
diagnose_design(confounding, sims = 2000)
# }
# NOT RUN {
# Curse of power: A biased design may be more likely to mislead the larger it is
curses <- expand_design(two_arm_covariate_designer,
N = c(50, 500, 5000), ate = 0, rho_WZ = .2, rho_WY = .2)
# }
# NOT RUN {
diagnoses <- diagnose_design(curses)
subset(diagnoses$diagnosands_df, estimator_label == "No controls")[,c("N", "power")]
# }
Run the code above in your browser using DataCamp Workspace