Initial sample size guess for the Potvin methods [Two-Stage / GS Designs]

posted by ElMaestro  – Belgium?, 2017-08-19 13:04 (1160 d 02:41 ago) – Posting: # 17709
Views: 25,929

Hi all,

just wanted to share a little algo for the initial sample size guess for the Potvin methods.
This is an area where speed gains are possible. A good initial sample size guess can eliminate quite some computation time. As I never got Zhang's method I played a little around with an entirely empirical idea.

My idea is that at least the upper part of a curve of power as function of sample size can be modeled as a kind of sigmoid function. I googled around to find a few expressions for such curves. The logistic function is one such. We can write the approximation something like:
Power=1/(1+exp(-k(N-x0)))

where N is the sample size.

If we have two estimates of power p1, p2 at sample sizes nps1 and nps2 (I use number of subjects per sequence, abbreviated as nps), then we can determine the constants:
a2=log(1/p2 - 1)
a1=log(1/p1 - 1)
x0=(a2*nps1-a1*nps2)/(a2-a1)
k=a1/(x0-nps1)


We can then solve for the desired power Pwr.T:
nps= x0+ (log(1/Pwr.T -1) / (-k))
- and this should of course converted to integer.

It turns out in my application to work really, really well.
The "only" issue is if the initial nps1 and nps2 are chosen poorly; p1 needs to be "not too close" to zero and p2 needs to be "not too close" to 1. But that's it.
My current implementation is this:

GetStartNps.X3=function(GMR, CV, Pwr.T)
{
  nps1=6
  p1=Power.calc(nps1, GMR, CV, Is.St2=1)  ##equation in Potvin et al.
  for (i in 1:3)
   if (p1<0.1) { nps1=4*nps1;p1=Power.calc(nps1, GMR, CV, Is.St2=1);}

  nps2=20*nps1
  p2=Power.calc(nps2, GMR, CV, Is.St2=1)
  f=2.4
  while(p2>0.99) { nps2=floor(nps2/f);p2=Power.calc(nps2, GMR, CV, Is.St2=1);}

  a2=log(1/p2 - 1)
  a1=log(1/p1 - 1)
  x0=(a2*nps1-a1*nps2)/(a2-a1)
  k=a1/(x0-nps1)
  Nps=floor(    x0+ (log(1/Pwr.T -1) / (-k))     )
  if (Nps<6) Nps=6
  return(Nps)
}


Works well for me for assumed GMR's close to 1 (such as 0.95) and I am sure if anyone cares to fiddle with it it can be improved much, much further to work well in "all" scenarios. Play around with the constants in red to get the optimization that works for you.:-)

I could be wrong, but...

Best regards,
ElMaestro

No, of course you do not need to audit your CRO if it was inspected in 1968 by the agency of Crabongostan.

Complete thread:

Activity
 Admin contact
21,176 posts in 4,413 threads, 1,475 registered users;
online 5 (0 registered, 5 guests [including 4 identified bots]).
Forum time: Thursday 15:46 UTC (Europe/Vienna)

It is not so much that I have confidence in scientists being right,
but that I have so much in nonscientists being wrong.    Isaac Asimov

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