This GitHub directory contains code for all simulations and real data application example presented in the manuscript draft “Upstrap for Estimating Power and Sample Size in Complex Models”.
The Joint High Performance Computing Exchange (JHPCE) is a High-Performance Computing (HPC) facility in the Department of Biostatistics at the Johns Hopkins Bloomberg School of Public Health was used to execute and aggregate the numerical experiments.
The aggregated data output files are stored within this repository and can be used to reproduce tables and files included in the manuscript.
- run_onesample_ttest.R – R script to run code for simulation problem 1
- run_twosample_ttest.R – R script to run code for simulation problem 2
- run_lm_testcoef.R – R script to run code for simulation problem 3
- run_glm_testcoef.R – R script to run code for simulation problem 4
- run_lmm_testcoef.R – R script to run code for simulation problem 5
- run_glmm_testcoef.R
– R script to run code for simulation problem 6
- run_twosample_ttest_vary_covprop.R – R script to run code for simulation problem 7
- run_lm_testcoef_vary_covprop.R – R script to run code for simulation problem 8
- run_lmm_testcoef_vary_covprop.R
– R script to run code for simulation problem 9
- run_twosample_ttest_vary_nobs_sd.R – R script to run code for simulation problem 10
- run_lm_testcoef_vary_nobs_sd.R – R script to run code for simulation problem 11
- run_lmm_testcoef_vary_nobs_sd.R
– R script to run code for simulation problem 12
- agg_sim_123456.R – R script to aggregate results from independent experiment repetitions for simulation problems 1-6
- agg_sim_vary_covprop.R – R script to aggregate results from independent experiment repetitions for simulation problems 7-9
- agg_sim_vary_nobs_sd.R – R script to aggregate results from independent experiment repetitions for simulation problems 10-12
- /results_CL_shared – directory with files containing aggregated results from independent experiment repetitions for simulation problems 1-12
- plot_sim_12.R – R script to generate Figure with results from simulation problems 1-2
- plot_sim_3456.R – R script to generate Figure with results from simulation problems 3-6
- plot_sim_vary_covprop.R – R script to generate Figure with results from simulation problems 7-9
- plot_sim_vary_nobs_sd.R – R script to generate Figure with results from simulation problems 10-12
- table_sim_PE.R – R script to generate Table with results from simulation problems 1-6
- table_sim_PE_vary_covprop.R – R script to generate Table with results from simulation problems 7-9
- table_sim_PE_vary_nobs_sd.R – R script to generate Table with results from simulation problems 10-12
- /results_figures/2021-12-04 – directory with Figures with results from simulation problems 1-12
- 2021-04-22-replicate_main_results.R – R script to reproduce main analysis/results from Bausema (2016) paper
- 2021-04-22-get_upstrap_main_results.R – R script to run upstrap for main analysis/results from Bausema (2016) paper
- 2021-05-02-get_upstrap_no_agg_results.R – R script to run upstrap for analysis that uses individual-level data from Bausema (2016) paper
- 2021-05-02-aggregate_upstrap_no_agg_results.R – R script to aggregate upstrap results from analysis that uses individual-level data from Bausema (2016) paper
- plot_bousema_reanalysis_results.R – R script to generate Figure with results from real data application analyses
- /results_figures – directory with Figures with results from eal data application analyses