Bioequivalence and Bioavailability Forum

Main page Policy/Terms of Use Abbreviations Latest Posts

 Log-in |  Register |  Search

Back to the forum  Query: 2017-09-23 21:50 CEST (UTC+2h)
 

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

posted by ElMaestro - Denmark, 2017-08-19 15:04  - Posting: # 17709
Views: 1,655

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

- since June 2017 having an affair with the bootstrap.

Complete thread:

Back to the forum Activity
 Mix view
Bioequivalence and Bioavailability Forum | Admin contact
17,323 Posts in 3,705 Threads, 1,071 registered users;
29 users online (0 registered, 29 guests).

It’s easy to lie with statistics;
it is easier to lie without them.    Frederick Mosteller

The BIOEQUIVALENCE / BIOAVAILABILITY FORUM is hosted by
BEBAC Ing. Helmut Schütz
XHTML/CSS RSS Feed