Create CTMC_script

R code for analysis