Benchmark code [Two-Stage / GS Designs]

posted by Helmut Homepage – Vienna, Austria, 2017-08-23 03:48 (2860 d 20:11 ago) – Posting: # 17741
Views: 29,846

Hi ElMaestro,

I changed this part (the number of repetitions should be left to microbench).
vecCritCVs<<-rep(0,500)
 for (Nps in 6:length(vecCritCVs))
  {
   if (Nps==6) iniCV=min(0.709*GMR-0.552, 0.709/GMR -0.552)
               else iniCV=vecCritCVs[Nps-1]
    vecCritCVs[Nps]<<-FindCritCV.Sec(0.8, GMR, Nps, 1, 1e-9, iniCV)
  }
  n2=GetNps(0.5)
 return(n2)
}

Bench.H1()


I ran just 10,000 cause yours was so slow. Improved over previous versions but still 260times slower than mine. BTW, Zhang’s approximation was spot on. No iterations performed at all (to be expected with a high sample size).

Unit: microseconds
            expr   min    lq  mean  median    uq    max neval
      Bench.H1() 27847 28381 29364 28943.8 29707 139057 10000
 sampleN2.TOST()    65    75   111   111.1   143   1614 10000


❝ Late edit: I believe we can even do something like:

Nps= 2* length(vecCritCVs[vecCritCVs<=CV])

❝ - which is faster still and does not explicitly involve a loop.


Given the results from above I didn’t try that.

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,424 posts in 4,927 threads, 1,674 registered users;
16 visitors (0 registered, 16 guests [including 12 identified bots]).
Forum time: 00:00 CEST (Europe/Vienna)

Medical researches can be divided into two sorts:
those who think that meta is better and those
who believe that pooling is fooling.    Stephen Senn

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