Calculates CritBoundaries for different types of futility criteria
crit_general(n, p0, p1, vn.int, alpha, crit, type=5, shape1 = 1, shape2 = 1)sample size at the final analysis
success rate corresponding to H0
success rate corresponding to H1 (p1 > p0)
vector of sample sizes at the interim analyses (the vector may be equal to 1:(n-1) = continuous monitoring of futility)
nominal probability of type 1 error used for the final test
critical level(s) of predictive/conditional power, (posterior) probabilities, rates, or patient numbers used for early termination. crit translates into futility boundaries (maximum number of successes leading to early termination). If simple rates are used for monitoring futility (type=7), crit is the critical success rate. Rates or probabilites must be input as percentages. In case of type 10 analyses, crit must be a vector of numbers of successes indicating futility bounds at each (interim or final)analysis.
see BDP2_simulate for details. Type of futility analysis: 1=predictive power; 2=conditional power under H1;
3=conditional power under the MLE; 4=posterior probability of a success
rate > p0; 5=posterior probability of a success rate >= p1;
6=predictive probability of reaching a "positive" final study result,
where "positive" is defined in terms of the posterior probability of a
success rate > p0. (Here, the ciritcal level must be >= 1- alpha).
7=estimated success rate; 8=p-values; 9="p-values under H1"; 10=user-
defined bounds (a vector of critical numbers of successes for each analysis)
for prior distribution
for prior distribution