|
1 | | -# BayesianPlatformDesignTimeTrend 1.0.0 |
2 | | -* Added a `NEWS.md` file to track changes to the package. |
| 1 | +# Jun 11, 2023, BayesianPlatformDesignTimeTrend version 1.1.1 |
| 2 | +This release fix one bug reported by the cran team. |
| 3 | + |
| 4 | +- I fixed the bug in function `GP.optim` where the nextcutoff vector for sample may have only one element. This will lead to the error in function `sample` when you only want to sample one value greater than 1. |
| 5 | +- The argument 'ntrials' in each example should be large (> 100) instead 2 to make the example more like an actual simulation example. I use ntrials = 2 in the example to speed up the check process. |
| 6 | +# May 2, 2023, BayesianPlatformDesignTimeTrend version 1.1.0 |
| 7 | +This release implements additional method of cutoff screening using Bayesian optimization. |
| 8 | + |
| 9 | +## New feature |
| 10 | +- Add a new Demo function called `demo_Cutoffscreening_GP`. The function indicates how to use Gaussian process-based Bayesian optimisation algorithm to calibrate the critical value for stopping boundary under the null scenario to control the Type I error rate or FWER before trial simulation. |
| 11 | + |
| 12 | +- Add a function `GP_optim` which returns a cutoff value for the next evaluation during the cutoff screening process. The function is used in demo `demo_Cutoffscreening_GP`. |
| 13 | + |
| 14 | +## Bugs |
| 15 | +- I found that the output data matrix can not be generated when there are four arm, the 'variable.inf' = "Mixeffect" and 'reg.inf' is "main"/"main + stage_continuous"/"main * stage_discrete". |
| 16 | +It only work for 'variable.inf'="Mixeffect" and 'reg.inf = main + stage_discrete'. The reason why this happen is that the length of stats6 and stats7 variable are not generated correctly at stage 1 since the fixed effect model is used for 'variable.inf'="Mixeffect" at stage 1 to speed up the simulation. |
| 17 | + |
| 18 | +## Debug |
| 19 | +- I add one ifelse command to enforce the generation of stats6 and stats7 when 'variable.inf'="Mixeffect". It does not depend on the value of 'reg.inf' now. |
| 20 | + |
| 21 | +# May 1, 2023, BayesianPlatformDesignTimeTrend version 1.0.1 |
| 22 | +## Major changes |
| 23 | +- I fixed a bug where the fix ratio allocation method code is not suitable for the multi-arm trial |
| 24 | + |
| 25 | +- Old code: rpk[-1] = rep((armleft - 1) / (armleft - 1 + Fixratiocontrol), armleft - 1) |
| 26 | +- New code: rpk[-1] = rep(1 / (armleft - 1 + Fixratiocontrol), armleft - 1) |
| 27 | + |
| 28 | +# Apr 25, 2023, BayesianPlatformDesignTimeTrend version 1.0.1 |
| 29 | +## Major changes |
| 30 | +- I added a check command for max.ar which is the upper boundary for randomisation ratio for each arm. The command is added in the MainFunction.R. Details are shown below. |
| 31 | +- #-max.ar check |
| 32 | + if (1 - max.ar > 1/K){ |
| 33 | + stop("Error: The lower allocation ratio should be at least 1/K. Please check the number of arm at the beginning and the max.ar") |
| 34 | + } |
| 35 | + |
| 36 | +- Another change is the randomisation ratio adjustment in the Simulation_AdaptiveRandomisationmethodRatioCalc.R. |
| 37 | + |
| 38 | +- I modified the randomisation ratio adjustment command for Thall's approach. |
| 39 | + |
| 40 | +- ##----Original code------ (This code only protects the control arm's allocation ratio) |
| 41 | +- rpk = matrix(rep(0, armleft), ncol = armleft) |
| 42 | +- randomprob = matrix(rep(0, K), ncol = K) |
| 43 | +- colnames(rpk) = c(1, treatmentindex + 1) |
| 44 | +- colnames(randomprob) = seq(1, K) |
| 45 | +- rpk[1] = alloc.prob.best[1] |
| 46 | +- rpk[-1] = alloc.prob.best[-1][treatmentindex] |
| 47 | +- rpk = rpk / sum(rpk) |
| 48 | +- lower = ifelse(rpk[1] < (1 - max.ar), 1 - max.ar, rpk[1]) |
| 49 | +- rpk[1] = lower |
| 50 | +- upper = ifelse(rpk[1] > max.ar, max.ar, rpk[1]) |
| 51 | +- rpk[1] = upper |
| 52 | +- rpk[-1] = (1 - rpk[1]) * rpk[-1] / sum(rpk[-1]) |
| 53 | +- randomprob[as.numeric(colnames(rpk))] = randomprob[as.numeric(colnames(rpk))] + rpk |
| 54 | + |
| 55 | +- ##----New code------ (This code protects all arms' allocation ratio. Also, this code work together with max.ar check code) |
| 56 | +- rpk = matrix(rep(0,armleft),ncol = armleft) |
| 57 | +- randomprob = matrix(rep(0,K),ncol = K) |
| 58 | +- colnames(rpk) = c(1,treatmentindex+1) |
| 59 | +- colnames(randomprob) = seq(1,K) |
| 60 | +- rpk[1] = alloc.prob.best[1] |
| 61 | +- rpk[-1] = alloc.prob.best[-1][treatmentindex] |
| 62 | +- rpk = rpk/sum(rpk) |
| 63 | +- lower = ifelse(rpk<(1-max.ar),1-max.ar,rpk) |
| 64 | +- rpk = lower |
| 65 | +- upper = ifelse(rpk>max.ar,max.ar,rpk) |
| 66 | +- rpk = upper |
| 67 | +- rpk[!(rpk==(1-max.ar))]=(1-sum(rpk[rpk==1-max.ar]))*(rpk[!(rpk==1-max.ar)]/sum(rpk[!(rpk==1-max.ar)])) |
| 68 | +- randomprob[as.numeric(colnames(rpk))] = randomprob[as.numeric(colnames(rpk))]+rpk |
| 69 | + |
0 commit comments