Sensitivity analysis for all ABE designs [Power / Sample Size]

posted by Helmut Homepage – Vienna, Austria, 2014-08-13 16:49 (4335 d 10:34 ago) – Posting: # 13374
Views: 22,332

Dear Detlew!

❝ Maybe there is a better solution than pasting the function into the R-console: Incorporating it into PowerTOST :cool:.


Up to you. My primary aim was an educational one – such questions regularly pop up at my workshops and end up in eyes wide opened in disbelief. ;-)

❝ May need some additional effort for checking the input and some effort for documenting.

❝ May need also some thinking about the return value(s) of the function.


Yessir. A tabular output would be nice. The plots are less than ideal yet.

❝ BTW: What did you mean by your sentence in your post above "This little exercise is not a substitute for the sensitivity analysis which should be performed in study planning ..."? Sens() not useful in real life?


Only as a “first look” since one of the parameters is varied in each case and the respective others are still “carved from stone”. My understanding of a sensitivity analysis is to explore their combinations, i.e., playing games like:

“What happens to power if we have x drop-outs, the CV increases to y% and the GMR shifts by z?”

In my protocols I use to come up with a couple of “plausible” ones.
Let’s think about my first example, planning for 90% and aiming at a minimum acceptable power for each parameter of 80% this time. That would translate into CV 20⇒24.25%, GMR 0.95⇒0.9208, and n 26⇒19. Although the worst case is possible, it is not realistic.
power2.TOST(CV=0.2425, theta0=0.9208, n=c(10, 9))
[1] 0.520466


I don’t think that there is an easy (automatic) solution. One could set a lower limit for the power of individual parameters (say 70%) and with a shotgun-simulation explore combinations which will prevent the power to drop below 80%. Such a simulation must also allow parameters to vary towards “better” values. Tricky.
BTW, I knew that the GMR is such a “Prinzessin auf der Erbse”, but was surprised how sen­si­tive (compared to the others) she is. Maybe we could consider to throw the upper CL of the CV into the waste-bin and work with the CI of the GMR (with a high α = the producer’s risk here)?
In my first example we get:

2x2 design:
CV=20%, GMR=0.9500, n=26, expected power=91.76% (>target of 90%)

The GMR could drop from 0.95 to 0.9044 to give 70% power. Quick and dirty:

require(PowerTOST)
alpha <- 0.2
CV    <- 0.2
GMR   <- 0.95
n     <- 26
des   <- "2x2"
CI    <- as.numeric(CI.BE(alpha=alpha, CV=CV, pe=GMR, n=n, design=des))
delta <- abs(CI-1)
lim   <- c("Lower", "Upper")
ifelse(delta[1] > delta[2], j <- 1, j <-2)
cat(sprintf("%s %s%5.4f%s %5.4f%s", lim[j], "CL of GMR=",
  GMR, ":", CI[j], "\n"))

Lower CL of GMR=0.9500: 0.9063


Interesting.

❝ ❝ Note that the code tries to keep the degree of imbalance as close as possible between sequences. In real life :blahblah:


❝ This is surely a minor shortcoming of your code. But if we assume drop-outs by random its a reasonable attempt I think in the planning phase where we don't have 'real life' data. And at least I have no "better" idea.


Agree.

❝ ❝ @R-Freaks: The construction of imbalanced sequences is both lengthy and clumsy. Any suggestions are welcome. ;-)


❝ Will try it if time allows :-D.

❝ Idea: use number of sequences = steps from known.designs() and make a general solution of the n's in sequence groups - looping over sequences.


Yes, I thought along these lines as well. No spare time at the moment… On the other hand if the code is capsuled in your famous package who cares how elegant it might be? Bringing the execution time down by a fraction of second does not really matter.

❝ ❝ * If a sequence is completely lost, power2.TOST() – correctly? – gives power=0. […]

❝ If this is truly correct? Don't think so.


Me not either. ;-)

❝ Simply the design changes to another one […] Not in known.designs()!

❝ Eventually power2.TOST() should throw an error/warning if it encounters some n's = zero.


Would make sense, IMHO.

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes

Complete thread:

UA Flag
Activity
 Admin contact
23,655 posts in 4,993 threads, 1,570 registered users;
419 visitors (0 registered, 419 guests [including 32 identified bots]).
Forum time: 03:23 CEST (Europe/Vienna)

Don’t compromise yourself.
You are all you’ve got.    Janis Joplin

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5