This function creates a data set with a single simulated oncology clinical trial with one row per transition based on an illness-death model. Studies with an arbitrary number of treatment arms are possible.

getOneClinicalTrial(
  nPat,
  transitionByArm,
  dropout = list(rate = 0, time = 12),
  accrual = list(param = "time", value = 0)
)

Arguments

nPat

(integer)
numbers of patients per treatment arm.

transitionByArm

(list)
transition parameters for each treatment group. See exponential_transition(), piecewise_exponential() and weibull_transition() for details.

dropout

dropout (list)
specifies drop-out probability. See getSimulatedData() for details. Can be specified either as one list that should be applied to all treatment groups or a separate list for each treatment group.

accrual

accrual (list)
specifies accrual intensity. See addStaggeredEntry() for details. Can be specified either as one list that should be applied to all treatment groups or a separate list for each treatment group.

Value

This returns a data frame with one simulated clinical trial and multiple treatment arms. See getSimulatedData() for the explanation of the columns. The column trt contains the treatment indicator. This is a helper function of getClinicalTrials().

Examples

transition1 <- exponential_transition(h01 = 1.2, h02 = 1.5, h12 = 1.6)
transition2 <- exponential_transition(h01 = 1, h02 = 1.3, h12 = 1.7)
transition3 <- exponential_transition(h01 = 1.1, h02 = 1, h12 = 1.5)
getOneClinicalTrial(
  nPat = c(30, 20, 30), transitionByArm = list(transition1, transition2, transition3),
  dropout = list(rate = 0, time = 12),
  accrual = list(param = "time", value = 0)
)
#>     id from to       entry        exit    entryAct     exitAct censAct trt
#> 1    1    0  2 0.000000000 0.963673284 0.000000000 0.963673284     Inf   1
#> 2    2    0  1 0.000000000 1.041846534 0.000000000 1.041846534     Inf   1
#> 3    2    1  2 1.041846534 1.586905060 1.041846534 1.586905060     Inf   1
#> 4    3    0  2 0.000000000 0.477939717 0.000000000 0.477939717     Inf   1
#> 5    4    0  2 0.000000000 0.198632402 0.000000000 0.198632402     Inf   1
#> 6    5    0  1 0.000000000 0.836504820 0.000000000 0.836504820     Inf   1
#> 7    5    1  2 0.836504820 1.580203688 0.836504820 1.580203688     Inf   1
#> 8    6    0  1 0.000000000 0.144586256 0.000000000 0.144586256     Inf   1
#> 9    6    1  2 0.144586256 0.983362551 0.144586256 0.983362551     Inf   1
#> 10   7    0  2 0.000000000 0.738316279 0.000000000 0.738316279     Inf   1
#> 11   8    0  1 0.000000000 0.324248942 0.000000000 0.324248942     Inf   1
#> 12   8    1  2 0.324248942 0.556819050 0.324248942 0.556819050     Inf   1
#> 13   9    0  1 0.000000000 0.120698069 0.000000000 0.120698069     Inf   1
#> 14   9    1  2 0.120698069 0.381017745 0.120698069 0.381017745     Inf   1
#> 15  10    0  1 0.000000000 0.379847986 0.000000000 0.379847986     Inf   1
#> 16  10    1  2 0.379847986 0.498251214 0.379847986 0.498251214     Inf   1
#> 17  11    0  1 0.000000000 0.550436302 0.000000000 0.550436302     Inf   1
#> 18  11    1  2 0.550436302 2.475427652 0.550436302 2.475427652     Inf   1
#> 19  12    0  1 0.000000000 0.065405460 0.000000000 0.065405460     Inf   1
#> 20  12    1  2 0.065405460 0.469864524 0.065405460 0.469864524     Inf   1
#> 21  13    0  1 0.000000000 0.416168752 0.000000000 0.416168752     Inf   1
#> 22  13    1  2 0.416168752 0.783483951 0.416168752 0.783483951     Inf   1
#> 23  14    0  1 0.000000000 0.848635343 0.000000000 0.848635343     Inf   1
#> 24  14    1  2 0.848635343 0.858052889 0.848635343 0.858052889     Inf   1
#> 25  15    0  2 0.000000000 0.293636775 0.000000000 0.293636775     Inf   1
#> 26  16    0  1 0.000000000 0.190591749 0.000000000 0.190591749     Inf   1
#> 27  16    1  2 0.190591749 0.687177090 0.190591749 0.687177090     Inf   1
#> 28  17    0  2 0.000000000 0.074930422 0.000000000 0.074930422     Inf   1
#> 29  18    0  2 0.000000000 0.799729649 0.000000000 0.799729649     Inf   1
#> 30  19    0  1 0.000000000 0.473761520 0.000000000 0.473761520     Inf   1
#> 31  19    1  2 0.473761520 0.693197582 0.473761520 0.693197582     Inf   1
#> 32  20    0  2 0.000000000 0.623404745 0.000000000 0.623404745     Inf   1
#> 33  21    0  1 0.000000000 0.276036099 0.000000000 0.276036099     Inf   1
#> 34  21    1  2 0.276036099 0.658747871 0.276036099 0.658747871     Inf   1
#> 35  22    0  2 0.000000000 0.248112642 0.000000000 0.248112642     Inf   1
#> 36  23    0  2 0.000000000 0.166077237 0.000000000 0.166077237     Inf   1
#> 37  24    0  2 0.000000000 0.119202878 0.000000000 0.119202878     Inf   1
#> 38  25    0  1 0.000000000 0.638967936 0.000000000 0.638967936     Inf   1
#> 39  25    1  2 0.638967936 0.741310222 0.638967936 0.741310222     Inf   1
#> 40  26    0  1 0.000000000 0.485001721 0.000000000 0.485001721     Inf   1
#> 41  26    1  2 0.485001721 1.495003407 0.485001721 1.495003407     Inf   1
#> 42  27    0  2 0.000000000 0.677533459 0.000000000 0.677533459     Inf   1
#> 43  28    0  2 0.000000000 0.424758013 0.000000000 0.424758013     Inf   1
#> 44  29    0  1 0.000000000 0.612796632 0.000000000 0.612796632     Inf   1
#> 45  29    1  2 0.612796632 1.552896927 0.612796632 1.552896927     Inf   1
#> 46  30    0  2 0.000000000 0.063063325 0.000000000 0.063063325     Inf   1
#> 47  31    0  1 0.000000000 0.108645977 0.000000000 0.108645977     Inf   2
#> 48  31    1  2 0.108645977 0.540585216 0.108645977 0.540585216     Inf   2
#> 49  32    0  2 0.000000000 0.008677608 0.000000000 0.008677608     Inf   2
#> 50  33    0  2 0.000000000 0.376999758 0.000000000 0.376999758     Inf   2
#> 51  34    0  1 0.000000000 0.004662485 0.000000000 0.004662485     Inf   2
#> 52  34    1  2 0.004662485 0.390248633 0.004662485 0.390248633     Inf   2
#> 53  35    0  2 0.000000000 0.549150618 0.000000000 0.549150618     Inf   2
#> 54  36    0  2 0.000000000 0.252850824 0.000000000 0.252850824     Inf   2
#> 55  37    0  2 0.000000000 0.048971014 0.000000000 0.048971014     Inf   2
#> 56  38    0  2 0.000000000 1.190994143 0.000000000 1.190994143     Inf   2
#> 57  39    0  1 0.000000000 0.387723021 0.000000000 0.387723021     Inf   2
#> 58  39    1  2 0.387723021 3.069441651 0.387723021 3.069441651     Inf   2
#> 59  40    0  2 0.000000000 0.153998393 0.000000000 0.153998393     Inf   2
#> 60  41    0  2 0.000000000 0.140612650 0.000000000 0.140612650     Inf   2
#> 61  42    0  2 0.000000000 0.115334711 0.000000000 0.115334711     Inf   2
#> 62  43    0  2 0.000000000 1.117426714 0.000000000 1.117426714     Inf   2
#> 63  44    0  2 0.000000000 0.369076069 0.000000000 0.369076069     Inf   2
#> 64  45    0  1 0.000000000 0.619694733 0.000000000 0.619694733     Inf   2
#> 65  45    1  2 0.619694733 1.909350201 0.619694733 1.909350201     Inf   2
#> 66  46    0  2 0.000000000 0.069418866 0.000000000 0.069418866     Inf   2
#> 67  47    0  2 0.000000000 0.018769671 0.000000000 0.018769671     Inf   2
#> 68  48    0  2 0.000000000 0.180340436 0.000000000 0.180340436     Inf   2
#> 69  49    0  1 0.000000000 0.748051530 0.000000000 0.748051530     Inf   2
#> 70  49    1  2 0.748051530 0.875678484 0.748051530 0.875678484     Inf   2
#> 71  50    0  2 0.000000000 1.073077454 0.000000000 1.073077454     Inf   2
#> 72  51    0  1 0.000000000 0.063585154 0.000000000 0.063585154     Inf   3
#> 73  51    1  2 0.063585154 0.169398825 0.063585154 0.169398825     Inf   3
#> 74  52    0  2 0.000000000 1.324966440 0.000000000 1.324966440     Inf   3
#> 75  53    0  1 0.000000000 0.227653135 0.000000000 0.227653135     Inf   3
#> 76  53    1  2 0.227653135 0.640835097 0.227653135 0.640835097     Inf   3
#> 77  54    0  1 0.000000000 0.026038723 0.000000000 0.026038723     Inf   3
#> 78  54    1  2 0.026038723 0.636689636 0.026038723 0.636689636     Inf   3
#> 79  55    0  2 0.000000000 0.155402816 0.000000000 0.155402816     Inf   3
#> 80  56    0  1 0.000000000 0.072191253 0.000000000 0.072191253     Inf   3
#> 81  56    1  2 0.072191253 0.556745505 0.072191253 0.556745505     Inf   3
#> 82  57    0  1 0.000000000 0.727734457 0.000000000 0.727734457     Inf   3
#> 83  57    1  2 0.727734457 1.128613158 0.727734457 1.128613158     Inf   3
#> 84  58    0  2 0.000000000 0.096652997 0.000000000 0.096652997     Inf   3
#> 85  59    0  2 0.000000000 1.041313011 0.000000000 1.041313011     Inf   3
#> 86  60    0  1 0.000000000 0.031554070 0.000000000 0.031554070     Inf   3
#> 87  60    1  2 0.031554070 0.378476550 0.031554070 0.378476550     Inf   3
#> 88  61    0  2 0.000000000 1.049345811 0.000000000 1.049345811     Inf   3
#> 89  62    0  2 0.000000000 1.274462026 0.000000000 1.274462026     Inf   3
#> 90  63    0  1 0.000000000 0.262239182 0.000000000 0.262239182     Inf   3
#> 91  63    1  2 0.262239182 1.185368013 0.262239182 1.185368013     Inf   3
#> 92  64    0  2 0.000000000 0.901371136 0.000000000 0.901371136     Inf   3
#> 93  65    0  2 0.000000000 0.009099860 0.000000000 0.009099860     Inf   3
#> 94  66    0  2 0.000000000 1.173042134 0.000000000 1.173042134     Inf   3
#> 95  67    0  2 0.000000000 0.218041763 0.000000000 0.218041763     Inf   3
#> 96  68    0  2 0.000000000 0.150703354 0.000000000 0.150703354     Inf   3
#> 97  69    0  2 0.000000000 0.176833163 0.000000000 0.176833163     Inf   3
#> 98  70    0  2 0.000000000 0.363713581 0.000000000 0.363713581     Inf   3
#> 99  71    0  2 0.000000000 0.290230965 0.000000000 0.290230965     Inf   3
#> 100 72    0  2 0.000000000 0.965436826 0.000000000 0.965436826     Inf   3
#> 101 73    0  2 0.000000000 1.290563037 0.000000000 1.290563037     Inf   3
#> 102 74    0  1 0.000000000 0.921337732 0.000000000 0.921337732     Inf   3
#> 103 74    1  2 0.921337732 1.411323176 0.921337732 1.411323176     Inf   3
#> 104 75    0  1 0.000000000 0.370194057 0.000000000 0.370194057     Inf   3
#> 105 75    1  2 0.370194057 0.998483516 0.370194057 0.998483516     Inf   3
#> 106 76    0  2 0.000000000 0.593267184 0.000000000 0.593267184     Inf   3
#> 107 77    0  2 0.000000000 0.087529620 0.000000000 0.087529620     Inf   3
#> 108 78    0  2 0.000000000 0.394015487 0.000000000 0.394015487     Inf   3
#> 109 79    0  1 0.000000000 0.473727459 0.000000000 0.473727459     Inf   3
#> 110 79    1  2 0.473727459 0.489373740 0.473727459 0.489373740     Inf   3
#> 111 80    0  1 0.000000000 0.062052474 0.000000000 0.062052474     Inf   3
#> 112 80    1  2 0.062052474 0.130825736 0.062052474 0.130825736     Inf   3