# Sample size/power simulation using multi-core computing in R

# Rationale

The goal of this simulation is to calculate power/sample size for a given hazard ratio (HR) in survival analysis by taking advantage of modern multicore computers. When we conduct simulation, generally, we simulate datasets for different combinations of sample size and HR then compute the proportion of rejection given the null vs. alternative hypotheses are H₀:HR=1 vs. H₁:HR<1 for treatment vs. control assuming treatment will perform better. Suppose, we are interested in calculating power when true…