Príklad 1: Neuenschwander et al.

Dávky lieku

dose<-c(1,2.5,5,10,15,20,25,30,40,50,75,100,150,200,250)

Kostra CRM, ktorá reprezentuje preddefinované pravdepodobnosti vedľajších účinkov:

p.tox0<-c(0.010,0.015,0.020,0.025,0.030,0.040,0.050,0.100,0.170,0.300,0.400,0.500,0.650,0.800,0.900)

Cieľová pravdepodobnosť vedľajších účinkov

target.tox<-0.30

Dáta z prvých 5 kohort, spolu 18 pacientov

data<-data.frame(patient=1:18,dose=rep(c(1:4,7),c(3,4,5,4,2)),tox=rep(0:1,c(16,2)))
data
##    patient dose tox
## 1        1    1   0
## 2        2    1   0
## 3        3    1   0
## 4        4    2   0
## 5        5    2   0
## 6        6    2   0
## 7        7    2   0
## 8        8    3   0
## 9        9    3   0
## 10      10    3   0
## 11      11    3   0
## 12      12    3   0
## 13      13    4   0
## 14      14    4   0
## 15      15    4   0
## 16      16    4   0
## 17      17    7   1
## 18      18    7   1

Najskôr skúsime použiť mocninový model s 1 neznámym parametrom.

Apriórne rozdelenie pre \(\alpha\) je lognormálne.

Stredná hodnota je 0 a smerodajná odchýlka 1.34 (na logaritmickej škále).

Ďalšia odporúčaná dávka je vypočítaná pomocou aposteriórnej strednej hodnoty.

Power.LN.bcrm<-bcrm(stop=list(nmax=18),data=data,
  p.tox0=p.tox0, dose=dose, ff="power", prior.alpha=list(3,0,1.34^2), target.tox=target.tox,
  constrain=FALSE,  #povolujeme zvysit/znizit dalvku o viac ako 1 hladinu
  sdose.calculate="median",pointest="mean")
## 
##  Stopping: Reached maximum sample size
print(Power.LN.bcrm)
## 
##  Estimation method:  exact
##  Target toxicity level:  0.3
##  Model:  1-parameter power
##  Prior:  Lognormal( Mean:0,  Variance:1.7956) 
## 
##  Standardised doses (skeleton): 
##     1   2.5     5    10    15    20    25    30    40    50    75   100 
## 0.010 0.015 0.020 0.025 0.030 0.040 0.050 0.100 0.170 0.300 0.400 0.500 
##   150   200   250 
## 0.650 0.800 0.900 
## 
##  Unmodified (unconstrained) CRM used 
## 
##  Posterior mean estimate of probability of toxicity used to select next dose 
## 
##  Toxicities observed: 
##             Doses
##              1 2.5 5 10 15 20 25 30 40 50 75 100 150 200 250
##   n          3   4 5  4  0  0  2  0  0  0  0   0   0   0   0
##   Toxicities 0   0 0  0  0  0  2  0  0  0  0   0   0   0   0
## 
##  Posterior estimates of toxicity: 
##         Doses
##               1    2.5      5     10     15     20     25    30    40
##   Mean   0.0702 0.0866 0.1010 0.1130 0.1250 0.1460 0.1650 0.244 0.333
##   SD     0.0558 0.0630 0.0686 0.0731 0.0769 0.0831 0.0879 0.102 0.109
##   Median 0.0561 0.0723 0.0865 0.0995 0.1110 0.1330 0.1530 0.237 0.330
##         Doses
##             50     75   100   150    200    250
##   Mean   0.467 0.5580 0.641 0.757 0.8650 0.9330
##   SD     0.108 0.0996 0.088 0.066 0.0398 0.0205
##   Median 0.471 0.5640 0.648 0.764 0.8700 0.9360
##          Doses
## Quantiles       1     2.5      5     10     15     20     25     30    40
##     2.5%  0.00493 0.00787 0.0110 0.0142 0.0175 0.0244 0.0316 0.0702 0.130
##     25%   0.02860 0.03910 0.0488 0.0579 0.0667 0.0833 0.0990 0.1690 0.255
##     50%   0.05610 0.07230 0.0865 0.0995 0.1110 0.1330 0.1530 0.2370 0.330
##     75%   0.09710 0.11900 0.1380 0.1540 0.1690 0.1960 0.2190 0.3120 0.408
##     97.5% 0.21300 0.24400 0.2690 0.2900 0.3080 0.3400 0.3660 0.4620 0.552
##          Doses
## Quantiles    50    75   100   150   200   250
##     2.5%  0.249 0.347 0.450 0.608 0.773 0.886
##     25%   0.395 0.493 0.586 0.717 0.842 0.922
##     50%   0.471 0.564 0.648 0.764 0.870 0.936
##     75%   0.544 0.629 0.704 0.804 0.893 0.948
##     97.5% 0.668 0.735 0.792 0.865 0.928 0.965
## 
##  Next recommended dose:  40
plot(Power.LN.bcrm) 

Interpretácia:

To isté s ohraničením, že nesmieme zvýšiť dávku o viac ako 1 hladinu

Power.LN.bcrm2<-bcrm(stop=list(nmax=18),data=data,
  p.tox0=p.tox0,dose=dose,ff="power", prior.alpha=list(3,0,1.34^2),target.tox=target.tox,
  constrain=TRUE,sdose.calculate="median",pointest="mean")
## 
##  Stopping: Reached maximum sample size
print(Power.LN.bcrm2)
## 
##  Estimation method:  exact
##  Target toxicity level:  0.3
##  Model:  1-parameter power
##  Prior:  Lognormal( Mean:0,  Variance:1.7956) 
## 
##  Standardised doses (skeleton): 
##     1   2.5     5    10    15    20    25    30    40    50    75   100 
## 0.010 0.015 0.020 0.025 0.030 0.040 0.050 0.100 0.170 0.300 0.400 0.500 
##   150   200   250 
## 0.650 0.800 0.900 
## 
##  Modified (constrained) CRM used,  starting dose:  1 
## 
##  Posterior mean estimate of probability of toxicity used to select next dose 
## 
##  Toxicities observed: 
##             Doses
##              1 2.5 5 10 15 20 25 30 40 50 75 100 150 200 250
##   n          3   4 5  4  0  0  2  0  0  0  0   0   0   0   0
##   Toxicities 0   0 0  0  0  0  2  0  0  0  0   0   0   0   0
## 
##  Posterior estimates of toxicity: 
##         Doses
##               1    2.5      5     10     15     20     25    30    40
##   Mean   0.0702 0.0866 0.1010 0.1130 0.1250 0.1460 0.1650 0.244 0.333
##   SD     0.0558 0.0630 0.0686 0.0731 0.0769 0.0831 0.0879 0.102 0.109
##   Median 0.0561 0.0723 0.0865 0.0995 0.1110 0.1330 0.1530 0.237 0.330
##         Doses
##             50     75   100   150    200    250
##   Mean   0.467 0.5580 0.641 0.757 0.8650 0.9330
##   SD     0.108 0.0996 0.088 0.066 0.0398 0.0205
##   Median 0.471 0.5640 0.648 0.764 0.8700 0.9360
##          Doses
## Quantiles       1     2.5      5     10     15     20     25     30    40
##     2.5%  0.00493 0.00787 0.0110 0.0142 0.0175 0.0244 0.0316 0.0702 0.130
##     25%   0.02860 0.03910 0.0488 0.0579 0.0667 0.0833 0.0990 0.1690 0.255
##     50%   0.05610 0.07230 0.0865 0.0995 0.1110 0.1330 0.1530 0.2370 0.330
##     75%   0.09710 0.11900 0.1380 0.1540 0.1690 0.1960 0.2190 0.3120 0.408
##     97.5% 0.21300 0.24400 0.2690 0.2900 0.3080 0.3400 0.3660 0.4620 0.552
##          Doses
## Quantiles    50    75   100   150   200   250
##     2.5%  0.249 0.347 0.450 0.608 0.773 0.886
##     25%   0.395 0.493 0.586 0.717 0.842 0.922
##     50%   0.471 0.564 0.648 0.764 0.870 0.936
##     75%   0.544 0.629 0.704 0.804 0.893 0.948
##     97.5% 0.668 0.735 0.792 0.865 0.928 0.965
## 
##  Next recommended dose:  30
plot(Power.LN.bcrm2)

Mocninový model nepopisuje dáta dostatočne: skúsime dvojparametrický logistický model.

Zároveň zmeníme aj kostru crm, aby sme lepšie zohľadnili vývoj vedľajších účinkov

p.tox1<-c(0.063, 0.125, 0.188, 0.250, 0.313, 0.375, 0.438, 0.500, 0.563, 0.625, 0.688, 0.751)
mu<-c(2.27,0.26)
Sigma<-rbind(c(1.98^2,-0.13),c(-0.13,0.40^2))
Logit.LN.bcrm2<-bcrm(stop=list(nmax=18),data=data,
  p.tox0=p.tox1,dose=dose[1:12],ff="logit2",prior.alpha=list(4,mu,Sigma),target.tox=target.tox,
  constrain=TRUE,sdose.calculate="median",pointest="mean")
print(Logit.LN.bcrm2)
plot(Logit.LN.bcrm2)

Nasimulujeme 10 pokusov veľkosti 36 (veľkost kohorty 3).

Máme ohraničenie na zvyšovanie dávky, začíname na najnižšej dávke.

Skutočné pravdepodobnosti vedľajších účinkov su p.tox0

Power.LN.bcrm.sim<-bcrm(stop=list(nmax=36),p.tox0=p.tox0,dose=dose,ff="power"
  ,prior.alpha=list(3,0,1.34^2),target.tox=target.tox,constrain=TRUE
  ,sdose.calculate="median",pointest="mean",start=1,simulate=TRUE,nsims=10,truep=p.tox0)
## Simulated trial: 10
print(Power.LN.bcrm.sim)
## Operating characteristics based on  10  simulations: 
##  
##               
## Sample size 36
## 
##                             Doses
##                              No dose      1    2.5      5     10     15
##   Experimentation proportion      NA 0.0833 0.0833 0.0833 0.0833 0.0833
##   Recommendation proportion        0 0.0000 0.0000 0.0000 0.0000 0.0000
##                             Doses
##                                  20     25     30    40    50     75
##   Experimentation proportion 0.0833 0.0833 0.0833 0.125 0.133 0.0667
##   Recommendation proportion  0.0000 0.0000 0.0000 0.200 0.500 0.2000
##                             Doses
##                                  100 150 200 250
##   Experimentation proportion 0.00833   0   0   0
##   Recommendation proportion  0.10000   0   0   0
## 
##                             Probability of DLT
##                              [0,0.2] (0.2,0.4] (0.4,0.6] (0.6,0.8] (0.8,1]
##   Experimentation proportion   0.792       0.2   0.00833         0       0
##   Recommendation proportion    0.200       0.7   0.10000         0       0
plot(Power.LN.bcrm.sim) 

Porovnáme CRM s 3+3 návrhom (obmedzíme sa len na prvých 12 dávok)

Toto dlho trva, keďže sa generuju všetky možné priebehy 3+3 návrhu

Power.LN.bcrm.compare.sim<-bcrm(stop=list(nmax=36),p.tox0=p.tox0[1:12],dose=dose[1:12]
  ,ff="power",prior.alpha=list(3,0,1.34^2),target.tox=target.tox,constrain=TRUE
  ,sdose.calculate="median",pointest="mean",start=1,simulate=TRUE,nsims=50
  ,truep=p.tox0[1:12],threep3=TRUE)
## Simulated trial: 10
## Simulated trial: 20
## Simulated trial: 30
## Simulated trial: 40
## Simulated trial: 50
##   Calculating operating characteristics of a standard 3+3 trial for comparison...
## 12% complete
## 16% complete
## 20% complete
## 24% complete
## 28% complete
## 32% complete
## 36% complete
## 40% complete
## 44% complete
## 48% complete
## 52% complete
## 56% complete
## 60% complete
## 64% complete
## 68% complete
## 72% complete
## 76% complete
## 80% complete
## 84% complete
## 88% complete
## 92% complete
## 96% complete
## 100% complete
print(Power.LN.bcrm.compare.sim,threep3=TRUE)
## Operating characteristics based on  50  simulations: 
##  
##               
## Sample size 36
## 
##                             Doses
##                              No dose      1    2.5      5     10     15
##   Experimentation proportion      NA 0.0833 0.0833 0.0833 0.0833 0.0833
##   Recommendation proportion        0 0.0000 0.0000 0.0000 0.0000 0.0000
##                             Doses
##                                  20     25     30    40    50     75
##   Experimentation proportion 0.0833 0.0833 0.0867 0.123 0.167 0.0317
##   Recommendation proportion  0.0000 0.0000 0.0000 0.180 0.560 0.2000
##                             Doses
##                                  100
##   Experimentation proportion 0.00833
##   Recommendation proportion  0.06000
## 
##                             Probability of DLT
##                              [0,0.2] (0.2,0.4] (0.4,0.6] (0.6,0.8] (0.8,1]
##   Experimentation proportion   0.793     0.198   0.00833         0       0
##   Recommendation proportion    0.180     0.760   0.06000         0       0
## 
## 
## ******************** 3+3 operating characteristics *****************
##                 Mean Minimum Maximum
## Sample size 36.23669       3      72
## 
##                             Doses
##                                  < 1      1     2.5       5      10     15
##   Experimentation proportion      NA 0.0898 0.09040 0.09110 0.09140 0.0918
##   Recommendation proportion  0.00117 0.0026 0.00456 0.00701 0.00991 0.0170
##                             Doses
##                                  20     25    30    40     50     75
##   Experimentation proportion 0.0929 0.0978 0.110 0.113 0.0848 0.0372
##   Recommendation proportion  0.0259 0.0917 0.208 0.346 0.2070 0.0623
##                             Doses
##                                 100
##   Experimentation proportion 0.0093
##   Recommendation proportion  0.0172
## 
##                             Probability of DLT
##                              [0,0.2] (0.2,0.4] (0.4,0.6] (0.6,0.8] (0.8,1]
##   Experimentation proportion   0.869     0.122    0.0093         0       0
##   Recommendation proportion*   0.713     0.269    0.0172         0       0
## 
##  * Amongst those trials that recommend an MTD
## 
##                             Doses
##                                  1    2.5      5     10     15    20    25
##   Average number of patients 3.100 3.1400 3.1800 3.2100 3.2500 3.320 3.510
##   Average number of DLTs     0.031 0.0471 0.0636 0.0804 0.0975 0.133 0.175
##                             Doses
##                                 30    40    50    75   100
##   Average number of patients 3.990 4.240 3.330 1.560 0.412
##   Average number of DLTs     0.399 0.721 0.999 0.624 0.206
plot(Power.LN.bcrm.compare.sim,threep3=TRUE)
## Warning: position_dodge requires non-overlapping x intervals

Dvojparametrický logistický model, apriórne rozdelenie dvojrozmerné lognormálne

sdose<-log(dose/250)
mu<-c(2.15,0.52)
Sigma<-rbind(c(0.84^2,0.134),c(0.134,0.80^2))
TwoPLogistic.mean.bcrm<-bcrm(stop=list(nmax=18),data=data,sdose=sdose
  ,dose=dose,ff="logit2",prior.alpha=list(4,mu,Sigma),target.tox=target.tox
  ,constrain=FALSE,pointest="mean")
## Warning in bcrm(stop = list(nmax = 18), data = data, sdose = sdose, dose =
## dose, : Exact method slow for 2-parameter model, suggest using rjags (MCMC)
## 
##  Stopping: Reached maximum sample size
print(TwoPLogistic.mean.bcrm)
## 
##  Estimation method:  exact.sim
##  Target toxicity level:  0.3
##  Model:  Two-parameter logistic
##  Prior:  Log Multivariate Normal
## Mean Vector:
## [1] 2.15 0.52
## 
## Variance-Covariance Matrix: 
##        [,1]  [,2]
## [1,] 0.7056 0.134
## [2,] 0.1340 0.640
## 
##  Standardised doses (skeleton): 
##          1        2.5          5         10         15         20 
## -5.5214609 -4.6051702 -3.9120230 -3.2188758 -2.8134107 -2.5257286 
##         25         30         40         50         75        100 
## -2.3025851 -2.1202635 -1.8325815 -1.6094379 -1.2039728 -0.9162907 
##        150        200        250 
## -0.5108256 -0.2231436  0.0000000 
## 
##  Unmodified (unconstrained) CRM used 
## 
##  Posterior mean estimate of probability of toxicity used to select next dose 
## 
##  Toxicities observed: 
##             Doses
##              1 2.5 5 10 15 20 25 30 40 50 75 100 150 200 250
##   n          3   4 5  4  0  0  2  0  0  0  0   0   0   0   0
##   Toxicities 0   0 0  0  0  0  2  0  0  0  0   0   0   0   0
## 
##  Posterior estimates of toxicity: 
##                 Doses
##                       1    2.5      5    10    15    20    25   30    40
##   Point estimate 0.0116 0.0295 0.0613 0.127 0.192 0.253 0.309 0.36 0.449
##                 Doses
##                     50    75   100   150   200   250
##   Point estimate 0.521 0.648 0.728 0.818 0.866 0.894
## 
##  Next recommended dose:  25
plot(TwoPLogistic.mean.bcrm)

Príklad 2

dose<-c(1,2.5,5,10,15,20,25,30)
p1<-c(.02, .06, .08,.12, .20, .30, .40, .50)
#p1<-c(.01, .05, .09, .14, .18, .22, .26, .30)
#p1<-c(.10, .20, .30, .40, .50, .60, .70, .80)
#p1<-c(.20, .30, .40, .50, .60, .65, .70, .75)
target.tox<-0.30

Ručné zadávanie dát

Doposiaľ sme podali liek 12 pacientom, dvaja mali vedľajšie účinky (dávka 4)

data<-data.frame(patient=1:12,dose=rep(c(1:4),c(3,3,3,3)),tox=rep(0:1,c(10,2))) 
pbcrm<-bcrm(stop=list(nmax=24),data=data,p.tox0=p1,dose=dose,ff="power",prior.alpha=list(3,0,1.34^2),target.tox=target.tox,constrain=FALSE
  ,sdose.calculate="median",pointest="mean",plot=TRUE)

print(pbcrm)
plot(pbcrm)

Nasimulujeme 10 pokusov veľkosti 36

pbcrm.sim<-bcrm(stop=list(nmax=36),p.tox0=p1,dose=dose,ff="power"
  ,prior.alpha=list(3,0,1.34^2),target.tox=target.tox,constrain=TRUE
  ,sdose.calculate="median",pointest="mean",start=1,simulate=TRUE,nsims=10,truep=p1)
## Simulated trial: 10
print(pbcrm.sim)
## Operating characteristics based on  10  simulations: 
##  
##               
## Sample size 36
## 
##                             Doses
##                              No dose      1    2.5      5     10    15
##   Experimentation proportion      NA 0.0833 0.0833 0.0833 0.0833 0.158
##   Recommendation proportion        0 0.0000 0.0000 0.0000 0.0000 0.000
##                             Doses
##                                 20    25     30
##   Experimentation proportion 0.217 0.233 0.0583
##   Recommendation proportion  0.600 0.400 0.0000
## 
##                             Probability of DLT
##                              [0,0.2] (0.2,0.4] (0.4,0.6] (0.6,0.8] (0.8,1]
##   Experimentation proportion   0.492      0.45    0.0583         0       0
##   Recommendation proportion    0.000      1.00    0.0000         0       0
plot(pbcrm.sim)

Porovnanie crm a 3+3 návrhu na základe 50 simulácií

pbcrm.compare.sim<-bcrm(stop=list(nmax=36),p.tox0=p1,dose=dose
  ,ff="power",prior.alpha=list(3,0,1.34^2),target.tox=target.tox,constrain=TRUE
  ,sdose.calculate="median",pointest="mean",start=1,simulate=TRUE,nsims=50
  ,truep=p1,threep3=TRUE)
## Simulated trial: 10
## Simulated trial: 20
## Simulated trial: 30
## Simulated trial: 40
## Simulated trial: 50
##   Calculating operating characteristics of a standard 3+3 trial for comparison...
## 18% complete
## 24% complete
## 29% complete
## 35% complete
## 41% complete
## 47% complete
## 53% complete
## 59% complete
## 65% complete
## 71% complete
## 76% complete
## 82% complete
## 88% complete
## 94% complete
## 100% complete
print(pbcrm.compare.sim,threep3=TRUE)
## Operating characteristics based on  50  simulations: 
##  
##               
## Sample size 36
## 
##                             Doses
##                              No dose    1    2.5      5    10    15    20
##   Experimentation proportion      NA 0.09 0.0933 0.0883 0.117 0.235 0.227
##   Recommendation proportion        0 0.00 0.0000 0.0000 0.020 0.220 0.480
##                             Doses
##                                 25     30
##   Experimentation proportion 0.108 0.0417
##   Recommendation proportion  0.220 0.0600
## 
##                             Probability of DLT
##                              [0,0.2] (0.2,0.4] (0.4,0.6] (0.6,0.8] (0.8,1]
##   Experimentation proportion   0.623     0.335    0.0417         0       0
##   Recommendation proportion    0.240     0.700    0.0600         0       0
## 
## 
## ******************** 3+3 operating characteristics *****************
##                 Mean Minimum Maximum
## Sample size 23.12627       3      48
## 
##                             Doses
##                                  < 1      1    2.5     5    10    15    20
##   Experimentation proportion      NA 0.1590 0.1720 0.172 0.176 0.160 0.105
##   Recommendation proportion  0.00461 0.0377 0.0618 0.121 0.244 0.288 0.176
##                             Doses
##                                  25     30
##   Experimentation proportion 0.0447 0.0110
##   Recommendation proportion  0.0529 0.0146
## 
##                             Probability of DLT
##                              [0,0.2] (0.2,0.4] (0.4,0.6] (0.6,0.8] (0.8,1]
##   Experimentation proportion   0.839     0.150    0.0110         0       0
##   Recommendation proportion*   0.752     0.228    0.0146         0       0
## 
##  * Amongst those trials that recommend an MTD
## 
##                             Doses
##                                   1   2.5     5    10    15    20   25
##   Average number of patients 3.2800 3.620 3.770 4.030 3.920 2.830 1.32
##   Average number of DLTs     0.0656 0.217 0.301 0.484 0.785 0.848 0.53
##                             Doses
##                                 30
##   Average number of patients 0.350
##   Average number of DLTs     0.175
plot(pbcrm.compare.sim,threep3=TRUE)
## Warning: position_dodge requires non-overlapping x intervals