est_fun.R & Pa_Pinconclu_est.R contain functions that can be sourced into other scripts
single-person.R gives estimates for sample size (number of cycles) needed under user-specified parameters
multi-person.R gives estimates for the sample size needed for a multi n-of-1 trials under user-specified parameters
single_sim.Rmd & multi_sim.Rmd replicate the simulation findings in the paper