## Technicality: Weigths for the inverse normal approach [Two-Stage / GS Designs]

Dear Helmut,

great post .

Only one remark about the weights you choose for the maximum combination test in your R code.

» ... »     for (j in seq_along(CV)) { »       n[j] <- sampleN.TOST(alpha=alpha, CV=CV[j], theta0=GMR, theta1=theta1, »                            theta2=theta2, targetpower=targetpower, »                            print=FALSE, details=FALSE)[["Sample size"]] »       if (n[j] < 12) n[j] <- 12 »       for (k in seq_along(n1)) { »         # median of expected total sample size as a 'best guess' »         n.tot <- power.tsd.in(alpha=alpha, CV=CV[j], n1=n1[k], GMR=GMR, »                               usePE=usePE, theta1=theta1, theta2=theta2, »                               targetpower=targetpower, fCrit=fCrit, »                               fClower=fClower, fCNmax=fCNmax, pmethod=pmethod, »                               npct=0.5)\$nperc[["50%"]] »         w     <- c(n1[k], n.tot - n1[k]) / n.tot »         # force extreme weights if expected to stop in stage 1 with n1 »         if (w == 1) w <- w + c(-1, +1) * 1e-6 »     ...

Defining the weights that way is IMHO not what you intended. Or I don't understand what you intended.
It is correct if you think in terms of the standard combination test and think further that you have to specify two weights for that. But since the two weights are connected by w, 1-w the second is calculated within the function power.tsd.in() automatically. You only need to define w in the input argument.

The idea behind the maximum combination test now is:
If our first pair of weights w, 1-w (chosen anyhow) is not "optimal", choose a second pair of weights w*, 1-w* which is more adapted to the real situation.
If you were too optimistic in your planing of n2, i.e. have chosen n2 too low compared to what really happens in the sample size adaption, it would be wise to define w* lower than w.
You do that, but your choice (w in w=0.999999, w* in w=1e-6) is too extreme I think and not your intention I further think. The second pair of weights w*=1e-6, 1-w*=0.999999 here is for a situation were the p-values from the second stage nearly exclusively determine the overall outcome of the maximum combination test. The p-values from the first stage data are down-weighted with w*=1e-6.

Hope this sermon is not too confusing.

BTW: Choosing the weights "optimal" is for me a mystery. To do that, we had to know the outcomes of the two stages, but we don't have them until the study has been done. On the other hand we have to predefine them to gain strict TIE control. Hier beißt sich die Katze in den Schwanz.

Regards,

Detlew  Ing. Helmut Schütz 