This function is used to generate one simulation dataset following the steps below:
1) determine sample size of the reference patient group (group 1) by calculating
round(total.sample.size/(group.sample.size.ratio+1))
;
2) determine sample size of the contrast group (group 2) total.sample.size - reference.group.n
;
3) generate follow-up time for both the referencee and the contrast group using negative bionomial distribution with user specified parameters time.to.event.distribution.para
;
4) generate vital status indictor for the reference group by sampling from the bionomial distribution with the number of trials = 1 and the probability of success/death = reference.group.incidence
;
5) generate vital status indictor for the contrast group by sampling from the bionomial distribution with the number of trials = 1 and
the probability of success/death = reference.group.incidence*(1-effect.size)
.