Skip to content

Latest commit

 

History

History
66 lines (56 loc) · 4.72 KB

README.md

File metadata and controls

66 lines (56 loc) · 4.72 KB

Simulation Study

Refer to section 6 of the manuscript

Organization

Code for Table 6.1 (JASA: Table 1)

Note that Table 6.1 is part of Table J.1. See the code for Table J.1.

Code for Appendix Table J.1 (JASA Supplemental material: Table J.1)

Code-tableJ.1 produces the results displayed in Table J.1.

Code for Appendix Table K.1 (JASA Supplemental material: Table K.1)

Code_table_K.1 produces the results displayed in Table K.1.

If you want to run a single RMD file to generate Table K.1, please run overall_table_K.1.Rmd

Code for Appendix Table K.2 (JASA Supplemental material: Table K.2)

Code_table_K.2 produces the results displayed in Table K.2.

If you want to run a single RMD file to generate Table k.2, please run overall_table_K.2.Rmd

Code for Appendix Table K.3 (JASA Supplemental material: Table K.3)

Code_table_K.3 produces the results displayed in Table K.3.

If you want to run a single RMD file to generate Table K.3, please run overall_table_K.3.Rmd

Code for Figure 3.1 (JASA: Figure 2)

Note that Figure 3.1(a) and 3.1(c) are also given in Figure D.1. See the code for Figure D.1(g) and D.1(h). For replication of these results please code for Figure D.1.

Code for Figure 6.1 (JASA: Figure 3)

Code_Figure_6.1 produces the results displayed in Figure 6.1.

If you want to run a single RMD file to generate Figure 6.1, please run Figure_6.1.R

Code for Appendix Figure D.1 (JASA Supplemental material: Figure D.1)

Code_Figure_D.1 produces the results displayed in Figure D.1.

If you want to run a single RMD file to generate Figure D.1, please run Figure_D.1.R

Code for Appendix Figure D.2 (JASA Supplemental material: Figure D.2)

Code_Figure_D.2 produces the results displayed in Figure D.2.

If you want to run a single RMD file to generate Figure D.2, please run Figure_D.2.R

Code for Appendix Figure D.3 (JASA Supplemental material: Figure D.3)

Code_Figure_D.3 produces the results displayed in Figure D.3.

If you want to run a single RMD file to generate Figure D.3, please run Figure_D.3.R

Package Details and Requirements

The statistical implementation of the simulation study requires the installation of the following important R libraries (we can install R packages from the command line):

Code Usage

Other details of our implementation choices for the simulation algorithm are provided below.

Parallel computing in R

After version 2.14, R has a built-in parallel package that enhances R's parallel computing capabilities. Parallel computing uses different cpu cores for computing. For the simulation study, we need to run each algorithm 100 times to calculate the Rejection rates, and parallel computing can save a lot of time.

Before parallel computing, we need to check the number of cores our computer can use by using the following command.

library(parallel) 
detectCores()

For example, the number of cores my computer can use is 16, so I use the following command to conduct parallel computing.

cl <- makeCluster(16)
registerDoParallel(cl)