ElMaestro
★★★

Denmark,
2011-01-16 20:13
(4820 d 06:30 ago)

Posting: # 6423
Views: 31,570
 

 Feature suggestion for bear and PowerTOST [🇷 for BE/BA]

Ahoy bears and dlabes


Wouldn't it be nice to include an option for (but not replace with) sample size calculation with adaptation to CI-widening ad modum the new BE guideline in Europe?
It would be easy enough to internally adapt the theta's where the input CV is in the 30%-50% range and the design is ref-replicated.

Best regards,
EM.

Pass or fail!
ElMaestro
d_labes
★★★

Berlin, Germany,
2011-01-17 14:19
(4819 d 12:24 ago)

@ ElMaestro
Posting: # 6427
Views: 28,918
 

 Sample size for widened scaled ABE limits

Ahoy my dear Capt'n,

❝ Wouldn't it be nice to include an option for (but not replace with) sample size calculation with adaptation to CI-widening ad modum the new BE guideline in Europe?


THX for your suggestion.

Theoretically the power of scaled ABE evaluation (if it could be done exact :cool:) and therefore the sample size is independent of the variability. Therefore it should be enough to tabulate sample sizes for different powers to achieve. For this reason the FDA has discussed 24 or 32 subjects for scaled ABE. See this post. But don't know where these numbers exactly came from.

Of course the 50% CV cut-off of the EMA complicates the situation.
Moreover the widened limits are only an approximation to the problem.
The constraint "point estimate within 0.8 - 1.25" is not part of the classical power considerations.

❝ It would be easy enough to internally adapt the theta's where the input CV is in the 30%-50% range and the design is ref-replicated.


require(PowerTOST)
CV  <- 0.3
CVr <- CV
if (CV>0.5) CVr <- 0.5
if (CV>=0.3) theta1 <- exp(-0.760*CV2se(CVr)) else theta1 <- 0.8
# change 0.76 to log(1.25)/CV2se(0.3) if you prefer higher precision
# for the regulatory constant
# change 0.76 to log(1.25)/0.25 and comment out the 4. code line
# if you prefer FDA's widened limits

sampleN.TOST(CV=CV,theta0=0.95,theta1=theta1,logscale=TRUE, design="2x3x3")


Easy enough for the programmer of the famous EFG :-D, although externally adapted?

Lets see what the results are:
# Targetpower=0.8, theta0=0.95, alpha=0.05, design=2x3x3 partial replicate
Regulatory body: EMA k=0.760
    CV   theta1  theta2 Sample size Achieved power
---------------------------------------------------
 0.275 0.800000 1.25000          27       0.841451
 0.299 0.800000 1.25000          30       0.822751
---------------------------------------------------
 0.300 0.800030 1.24995          30       0.820245  # limits not exact 0.8 - 1.25
 0.325 0.785978 1.27230          30       0.833297
 0.350 0.772322 1.29480          27       0.802139
 0.400 0.746177 1.34016          27       0.818089
 0.450 0.721545 1.38591          27       0.829135
 0.500 0.698368 1.43191          27       0.837096
---------------------------------------------------
 0.550 0.698368 1.43191          30       0.811407
 0.600 0.698368 1.43191          36       0.826497
 0.650 0.698368 1.43191          39       0.802684
 0.700 0.698368 1.43191          45       0.812494


Regulatory body: FDA k=0.893
    CV   theta1  theta2 Sample size Achieved power
---------------------------------------------------
 0.275 0.800000 1.25000          27       0.841451
 0.299 0.800000 1.25000          30       0.822751
--------------------------------------------------- # discontinuity!
 0.300 0.769396 1.29972          21       0.828956
 0.350 0.738182 1.35468          21       0.846446
 0.400 0.708907 1.41062          21       0.857880
 0.450 0.681490 1.46737          21       0.865758
 0.500 0.655842 1.52476          18       0.805337
 0.550 0.631865 1.58262          18       0.809706
 0.600 0.609461 1.64079          18       0.813047
 0.650 0.588531 1.69915          18       0.815660
 0.700 0.568975 1.75755          18       0.817743

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2011-01-17 15:38
(4819 d 11:05 ago)

@ d_labes
Posting: # 6429
Views: 29,029
 

 0.760 or...

Dear D. Labes!

❝ […] therefore the sample size is independent of the variability. […] For this reason the FDA has discussed 24 or32 subjects for scaled ABE. […] But don't know where these numbers exactly came from.


32 was FDA’s suggestion back in 2006 (see here). 24 is FDA’s current requirement (personal communication with Barbara Davit, Ljubljana, May 2010).

if (CV>=0.3) theta1 <- exp(-0.760*CV2se(CVr)) else theta1 <- 0.8

# change 0.76 to log(1.25)/CV2se(0.3) if you prefer higher precision

# for the regulatory constant


❝ Lets see what the results are:

# Targetpower=0.8, theta0=0.95, alpha=0.05, design=2x3x3 partial replicate

❝ Regulatory body: EMA k=0.760

»

     CV   theta1  theta2 Sample size Achieved power

---------------------------------------------------

  0.300 0.800030 1.24995          30       0.820245  # limits not exact 0.8 - 1.25


Yes, we discussed that already in #5249pp. As the grumpy old man I am I was already lamenting in one of my lectures (slides 32-33). Though I have only used exact widened limits of 0.75 and 0.75-1 in the past (not UL of 1.3333) I woudn’t bet on the acceptability of the exact value (which I will use anyway). As you mentioned in your commented code, one will get the ‘correct’ limits by calculating the regulatory constant based on a CV of 30%.
theta1 <- exp(-log(1.25)/CV2se(0.3)*CV2se(CVr))
    CV   theta1  theta2 Sample size Achieved power
---------------------------------------------------
 0.300 0.800000 1.25000          30       0.820400  # limits exactly 0.8 - 1.25
 0.325 0.785946 1.27235          30       0.833446
 0.350 0.772289 1.29485          27       0.802301
 0.400 0.746140 1.34023          27       0.818245
 0.450 0.721506 1.38599          27       0.829288
 0.500 0.698326 1.43200          27       0.837245
---------------------------------------------------
 0.550 0.698326 1.43200          30       0.811569
 0.600 0.698326 1.43200          36       0.826651
 0.650 0.698326 1.43200          39       0.802849
 0.700 0.698326 1.43200          45       0.812654


P.S.: Do you think that engineers would use 3.14 instead of π, because it’s written in a guideline? Bridges would collpase, trains derail, etc. :-D

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
d_labes
★★★

Berlin, Germany,
2011-01-17 17:37
(4819 d 09:06 ago)

@ Helmut
Posting: # 6433
Views: 28,713
 

 ... full precision is the question

Dear Helmut,

I correct my code as following:

...
k <- (log(1.25)/CV2se(0.3))
if (CV>=0.3) theta1 <- exp(-k*CV2se(CVr)) else theta1 <- 0.8
# change k to 0.760 if you prefer to take the EMA guidance
# literally, carved in stone :cool: letter by letter and number by number
# ("kein Tüttelchen davon abweichen")

...


I do this because I wont take liability of collpasing bridges, derailing trains of Deutsche Bahn, etc. :-D

BTW: R
> options(digits=30)
Error in options(digits = 30) :
  invalid 'digits' parameter, allowed 1...22
> options(digits=22)
> pi
[1] 3.141592653589793
# only 16 digits!


I have learned in my early days during learning draftsman in agrar melioration engineering that 22/7=3.142857 is an good estimate. Very near to your 3.14! Maybe there were not so much circles involved, but more triangles and rectangles :-D.

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2011-01-17 19:06
(4819 d 07:36 ago)

@ d_labes
Posting: # 6434
Views: 30,665
 

 ... full precision is the question

Dear D. Labes,

THX for supporting an ol’ fart.

❝ BTW: R

> options(digits=30)

Error in options(digits = 30) :

  invalid 'digits' parameter, allowed 1...22

> options(digits=22)

> pi

[1] 3.141592653589793

# only 16 digits!


Right. Interesting, that signif doesn’t throw an error for values > 22.
options(signif=32)
However
pi
[1] 3.141592653589793

Doesn’t really surprise me; that’s the numeric resolution of my 32 bit XP; I guess you have one of these fancy 64 bit operating systems?
There’s a package for R being able to handle floating point operations in arbitrary precision – essentially by converting all numbers to character strings. :-D

❝ I have learned in my early days during learning draftsman in agrar melioration engineering that 22/7=3.142857 is an good estimate. Very near to your 3.14! Maybe there were not so much circles involved, but more triangles and rectangles :-D.


Yes, I’ve learned that one also. Another one is Archimedes’: 3+10/71 < π < 3+10/70 (the upper limit is your’s; the mean is just 0.008% off). Not so bad for 250 BCE!
Maniacs might click here or there.

Fascinating that calc.exe comes up with:
Pi 3.1415926535897932384626433832795
Maybe it’s stored somewhere? Let’s try a true calculation:
[o] Rad 1 [x] Inv tan
0.78539816339744830961566084581988
* 4 =
3.1415926535897932384626433832795
Amazing. According to the online help calculations are performed in 32 digit precision.
- Pi =
-1.393267707463821448075635979701e-37
Gotcha!

If you have Java onboard, a true overkill for nerds (calling a Java implementation of Python ‘Jython’, library sympy for symbolic mathematics from R):

require(rSymPy)
sympy("pi.evalf(1000)")
[1]  "3.141 592 653 589 793 238 462 643 383 279 502 884 197 169 399 375 105 820 974 944 592 307 816 406 286 208 998 628 034 825 342 117 067 982 148 086 513 282 306 647 093 844 609 550 582 231 725 359 408 128 481 117 450 284 102 701 938 521 105 559 644 622 948 954 930 381 964 428 810 975 665 933 446 128 475 648 233 786 783 165 271 201 909 145 648 566 923 460 348 610 454 326 648 213 393 607 260 249 141 273 724 587 006 606 315 588 174 881 520 920 962 829 254 091 715 364 367 892 590 360 011 330 530 548 820 466 521 384 146 951 941 511 609 433 057 270 365 759 591 953 092 186 117 381 932 611 793 105 118 548 074 462 379 962 749 567 351 885 752 724 891 227 938 183 011 949 129 833 673 362 440 656 643 086 021 394 946 395 224 737 190 702 179 860 943 702 770 539 217 176 293 176 752 384 674 818 467 669 405 132 000 568 127 145 263 560 827 785 771 342 757 789 609 173 637 178 721 468 440 901 224 953 430 146 549 585 371 050 792 279 689 258 923 542 019 956 112 129 021 960 864 034 418 159 813 629 774 771 309 960 518 707 211 349 999 998 372 978 049 951 059 731 732 816 096 318 595 024 459 455 346 908 302 642 522 308 253 344 685 035 261 931 188 171 010 003 137 838 752 886 587 533 208 381 420 617 177 669 147 303 598 253 490 428 755 468 731 159 562 863 882 353 787 593 751 957 781 857 780 532 171 226 806 613 001 927 876 611 195 909 216 420 198"

Wow!

Remember that one?
factorial(170)
[1] 7.25741561530888e+306
factorial(171)
[1] Inf
Warning:
In factorial(171) : Value out of range in 'gammafn'

But:
sympy("factorial(170)")
[1]  "7 257 415 615 307 998 967 396 728 211 129 263 114 716 991 681 296 451 376 543 577 798 900 561 843 401 706 157 852 350 749 242 617 459 511 490 991 237 838 520 776 666 022 565 442 753 025 328 900 773 207 510 902 400 430 280 058 295 603 966 612 599 658 257 104 398 558 294 257 568 966 313 439 612 262 571 094 946 806 711 205 568 880 457 193 340 212 661 452 800 000 000 000 000 000 000 000 000 000 000 000 000 000"
sympy("factorial(171)")
[1]  "1 241 018 070 217 667 823 424 840 524 103 103 992 616 605 577 501 693 185 388 951 803 611 996 075 221 691 752 992 751 978 120 487 585 576 464 959 501 670 387 052 809 889 858 690 710 767 331 242 032 218 484 364 310 473 577 889 968 548 278 290 754 541 561 964 852 153 468 318 044 293 239 598 173 696 899 657 235 903 947 616 152 278 558 180 061 176 365 108 428 800 000 000 000 000 000 000 000 000 000 000 000 000 000"

:ok: (stopped testing at 100 000! – lots of digits)

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
d_labes
★★★

Berlin, Germany,
2011-01-18 09:32
(4818 d 17:11 ago)

@ Helmut
Posting: # 6437
Views: 28,942
 

 OT: Number of horns on a unicorn

Dear Helmut,

Kudos to you!
You can always top it :clap:.

BTW: Try
:google: number of horns on a unicorn * the answer to life the universe and everything * once in a blue moon

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2011-01-18 12:44
(4818 d 13:58 ago)

@ d_labes
Posting: # 6441
Views: 28,849
 

 Goooogle

Dear D Labes,

:google: number of horns on a unicorn * the answer to life the universe and everything * once in a blue moon


I didn't know the last one!
Going :offtopic!:
For many years [image]-maps contained another gem: When you asked for the route between any European city and let’s say, Times Square, New York, NY you were provided with detailed instructions going to the next harbour, a nice orthodrome suggesting to swim across the Atlantic making landfall in Battery Park, and to continue north via Broadway…
Unfortunately [image] has removed this feature; a similar image here. Some others.

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
ElMaestro
★★★

Denmark,
2011-01-19 18:50
(4817 d 07:53 ago)

@ d_labes
Posting: # 6451
Views: 28,724
 

 Cadmium

Ahoy dlabes,

always a pleasure reading posts from you; I understand so little...

❝ Theoretically the power of scaled ABE evaluation (if it could be done exact :cool:) and therefore the sample size is independent of the variability.


This thing about 'If it could be done exact :cool:' just made me wonder. Of course power calculations with computers is not an exact business but I will in the following not be discussing the 17th decimal.

If I get you right you are looking for the answer to this question:
If we have a power of P at T/R=soandso and CV being thisorthat, then what should the accetance range be if the CV is not thisorthat but blahblah?

In principle, the EMA guideline provides the answer to that Question as it allows a construct of a curve of acceptance range versus CV. But trying to decipher your encrypted babblings, you're saying this is an approximation given that power should be the constant.
Allow me to return to the famous german desert and ingestion of clothing, but this time garnished with some heavy metal (I use the simple example of a 2,2,2-design although this is not the relevant one for scaling but it can be adapted pretty easily):

EatMyShorts <- function (x, V, T, W)
{
 
  l1 = pnorm((T*x/sqrt(V)) - W);
 
  l2 = (V-1.0)*log(x) -lgamma(0.5*V) - (0.5*(V-2.0))* log (2.0);
  l3 = exp(l2);
  l4 =dnorm(x);
  l1*l3*l4;
 
}

Apfelstrudel<-function(t, df, ta, tb, ncp, ACCURACY)
{
  L1 = sqrt(2*pi);
  P=0;
  step = (tb-ta)/ACCURACY;
  foo=ta;
  for (i in 1:ACCURACY)
    {
      y1 = EatMyShorts(foo, df, t, ncp);
      y2 = EatMyShorts(foo+0.5*step, df,t, ncp);
      y3 = EatMyShorts(foo+step, df,t, ncp);
      P=P+step*(y1+y2*4+y3)/6; ## homer simpson's meffud!
      foo=foo+step;
    }
  L1*P
}


Pwr222 <- function (N, alpha, AccLimitLo, AccLimitHi, TRRatio, CV)
{
  df = N-2;
  tc = qt( 1-alpha, df);
  k  = sqrt(2/N);
  d1 = (log(TRRatio)-log(AccLimitLo))/(k * sqrt(log(1+CV*CV)));
  d2 = (log(TRRatio)-log(AccLimitHi))/(k * sqrt(log(1+CV*CV)));
  R  = sqrt(df) * (d1-d2) / (2*tc);
 
  P2 = Apfelstrudel(-tc, df, 0,R,d2, 300);
  P1 = Apfelstrudel(tc, df, 0,R,d1, 300);
  P2-P1
}

I_Eat_Cadmium <- function(P, TR, CV, alpha, N)
{

   AccLimLo = 0.9999;
   
   delta= 0.05;
   for (i in 1:20) ##change 20 here for fiddling with precision and time
    {
      AccLimHi=1/AccLimLo;   
      P0=P
      P1=Pwr222(N, alpha, AccLimLo, AccLimHi, TR, CV);
      while (P1<P0)
       {
        AccLimLo1=AccLimLo-delta;
        AccLimHi1=1/AccLimLo1;   
        P1=Pwr222(N, alpha, AccLimLo1, AccLimHi1, TR, CV)
        AccLimLo=AccLimLo-delta
       }
      if (P1>=P0) AccLimLo=AccLimLo1+delta else AccLimLo=AccLimLo1;
      delta=delta*0.4; ##change factor here for fiddling with precision and time       
               
    }
   cat("Acc Lim Lo: ", AccLimLo, "\n");
   cat("Acc Lim Hi: ", 1/AccLimLo, "\n");
}



Pwr222(30,0.05, 0.8, 1.25, 0.95, 0.3) is 0.6850399.

Let's check:
OK, what acceptance range matches a 2,2,2-design with T/R being 0.95, N=30 and power being 0.6850399?

I_Eat_Cadmium (0.6850399, 0.95, 0.3, 0.05, 30) gives the answer.

And if the CV is not 0.3 but 0.4 then which acc range can apply?
I_Eat_Cadmium (0.6850399, 0.95, 0.4, 0.05, 30)


Better approximation possible by this approach, no?


EM.
d_labes
★★★

Berlin, Germany,
2011-01-20 16:00
(4816 d 10:42 ago)

@ ElMaestro
Posting: # 6456
Views: 28,891
 

 Never eaten Cadmium deliberately

Ahoy dear "Der Meister",

sorry but I must confess that I'm totally confused and that I can't follow your points and reasoning :confused:.

❝ If I get you right you are looking for the answer to this question:

❝ If we have a power of P at T/R=soandso and CV being thisorthat, then what should the accetance range be if the CV is not thisorthat but blahblah?


I never asked that question (they never came into my mind!) and I can't imagine what the results of I_Eat_Cadmium() are. Eventually hard poisoning with some side effects on the CNS :-D?

What I meant with my sentence is that using the original scaled ABE criterion
  (µT-µR)2/s2WR < (theta/sw0)2
would let to power calculations that are independent from the variabilities, at least at true µT-µR=0.
This is well known for using the "effect size" in superiority studies.
But this can only be proven for BE within the classical 2x2 design because in case of others the distribution of the test statistics are not known exactly.

See f.i.
L. Tothfalusi, L. Endrenyi and A. Garcia Arieta
"Evaluation of Bioequivalence for Highly Variable Drugs with Scaled Average Bioequivalence"
Clin Pharmacokinet 2009; 48 (11): 725-743

The use of the widened acceptance limits according to the EMA guidance is only an approximation to the original problem (as well as the linearized criterion with approximate upper 95% CI in the FDA Progesterone guidance).

Power calculations for the EMA widened acceptance limits can be done naively by inserting the widened limits depending on the assumed CV into the classical power formulas.
I had thought that Your feature request is going in that direction.

Lets see what happens with this approach:
require(PowerTOST)
#regulatory constant
k <- (log(1.25)/CV2se(0.3))

CVs <- c(0.3,0.35,0.4,0.45,0.5,0.55,0.6)
#restrict widening to CV=50%
CVr <- ifelse(CVs>0.5,0.5,CVs)
#widened limits
theta1 <- ifelse(CVr>=0.3, exp(-k*CV2se(CVr)), 0.8)

# GMR =1
pow <- vector("numeric",length=length(CVs))
for (i in seq_along(CVs)){
  pow[i] <- power.TOST(n=20, CV=CVs[i], theta0=1, theta1=theta1[i], design='2x2x4')
}

# GMR = 0.95
pow <- vector("numeric",length=length(CVs))
for (i in seq_along(CVs)){
  pow[i] <- power.TOST(n=20, CV=CVs[i], theta0=0.95, theta1=theta1[i], design='2x2x4')
}
data.frame(CV=CVs, AccLimLo=theta1, AccLimHi=1/theta1, power=pow)

Results:
GMR=1
    CV  AccLimLo AccLimHi     power
1 0.30 0.8000000 1.250000 0.9132950
2 0.35 0.7722885 1.294853 0.9132950
3 0.40 0.7461401 1.340231 0.9132950
4 0.45 0.7215055 1.385991 0.9132950
5 0.50 0.6983255 1.431997 0.9132950
-----------------------------------
6 0.55 0.6983255 1.431997 0.8503237
7 0.60 0.6983255 1.431997 0.7759268

GMR=0.95
    CV  AccLimLo AccLimHi     power
1 0.30 0.8000000 1.250000 0.8202398
2 0.35 0.7722885 1.294853 0.8436856
3 0.40 0.7461401 1.340231 0.8590072
4 0.45 0.7215055 1.385991 0.8695570
5 0.50 0.6983255 1.431997 0.8771277
-----------------------------------
6 0.55 0.6983255 1.431997 0.8113771
7 0.60 0.6983255 1.431997 0.7380680


You see (if not you need glasses :cool:):
  1. Power is actually independent of the CV if GMR=1 up to the EMA cutoff CV=50%.
  2. The power is dependent on the CV (variability) if GMR!=1.
  3. The power increases with variability in the range 0.3 - 0.5 where scaling/widening is according to the magnitude of the CV. This is counter-intuitive!
Moreover the classical power formulas have nowhere the scABE constraint "point est. must be within 0.8-1.25" as presupposition.
Thus my encrypted babblings are nothing more then the statement: "I'm not convinced that we are actually calculating somefink that can be called power of scABE if we do it that way".

Long post but not any meaning :cool:.

"Power Calculation - A guess masquerading as mathematics."
Guernsey McPearson


Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2011-01-20 16:25
(4816 d 10:18 ago)

@ d_labes
Posting: # 6457
Views: 28,851
 

 Never eaten Cadmium deliberately

Dear D. Labes!

❝ Lets see what happens with this approach:

require(PowerTOST)


0-8.3 :clap:
  1. expected
  2. interesting
  3. strange

❝ Moreover the classical power formulas have nowhere the scABE constraint

❝ "point est. must be within 0.8-1.25" as presupposition.


We can't incoporate a political constraint in an explicit statistical formula. The only way IMHO would be to go with Monte Carlo simulations.

Power: That which is wielded by the priesthood of clinical trials, the statisticians,
and a stick which they use to beta their colleagues.

Stephen Senn (Statistical Issues in Drug Development, Wiley p171, 2004)


P.S.: Added one missing '}' to your code above.

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
d_labes
★★★

Berlin, Germany,
2011-01-20 17:15
(4816 d 09:28 ago)

@ Helmut
Posting: # 6460
Views: 28,670
 

 Call of duty for simulants

Dear Helmut!

❝ 0-8.3 :clap:

No reason for applause. Introduced an error in a working function in previous version :-(.

❝ We can't incorporate a political constraint in an explicit statistical formula. The only way IMHO would be to go with Monte Carlo simulations.


IMHO right. All the power calculations seen in the literature about scABE were done via simulations.

But this is not so easy to implement for all the designs covered in PowerTOST. If anybody out there has an idea or code, feel free to contact me to incorporate it in the package.


Edit: I'll try to shanghai Martin and Jack... [Helmut]

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2011-01-21 05:13
(4815 d 21:30 ago)

@ d_labes
Posting: # 6464
Views: 28,689
 

 Counterinuitive

Dear D. Labes!

[image] no comment

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
d_labes
★★★

Berlin, Germany,
2011-01-21 09:36
(4815 d 17:07 ago)

(edited by d_labes on 2011-01-21 10:48)
@ Helmut
Posting: # 6467
Views: 28,471
 

 Counterintuitive

Dear Helmut!

❝ … no comment


For me as stupid person You should comment please! I do not see my observation "rising sun ääh … power with CV". Thus it must be done another way. How did you get this?

Helmut: Forget my post or delete it. I have totally misinterpreted the graphics :-(.
Learned: First think, then post.

BTW: Looking at the time of your post: did You suffer from senile Bettflucht (insomnia, Google translator "Bed run") :-D?

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2011-01-21 13:53
(4815 d 12:50 ago)

@ d_labes
Posting: # 6469
Views: 28,694
 

 Counterintuitive

Dear D. Labes!

❝ BTW: Looking at the time of your post: did You suffer from senile Bettflucht (insomnia, Google translator "Bed run") :-D?


Not quite. I rarely go to bed earlier than 03:00 am – so this was just an outlier. :PCchaos:

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
d_labes
★★★

Berlin, Germany,
2011-01-21 13:12
(4815 d 13:31 ago)

@ Helmut
Posting: # 6468
Views: 28,966
 

 Counterinuitive, but ...

Dear Helmut!

Look at this!
[image]
I have combined the the graphics from the paper
L. Tothfalusi, L. Endrenyi
Limits for the scaled average bioequivalence of highly variable drugs and drug products
Pharm. Res. 20, p382-389 (2003)

Figure 3 "Percentage of simulated two-period crossover studies in which BE was accepted ..."

Wow!

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2011-01-21 14:01
(4815 d 12:42 ago)

@ d_labes
Posting: # 6471
Views: 28,518
 

 Counterinuitive, but ...

Dear D. Labes!

❝ Look at this!

Wow!


:surprised:

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
d_labes
★★★

Berlin, Germany,
2011-01-21 15:43
(4815 d 11:00 ago)

@ Helmut
Posting: # 6474
Views: 28,642
 

 Wow, Wow ...

Dear Helmut,

beyond belief for me simple minded but seems definitely TRUE.

Have a look at Figs. 3 and 4 of
Haidar et. al.
Evaluation of a Scaling Approach for the Bioequivalence of Highly Variable Drugs
The AAPS Journal, Vol. 10, No. 3, p450-454, 2008
online resource
to see the same behaviour, also for the combined criteria scaled ABE + constraint on point estimate.

See also
Endrenyi, Tothfalusi
Presentation at BASS 2010
Scaled Average bioequivalence: An Approach to Resolve a Difficult Program
page 21-23.

See also Page 28 of that presentation to notice increasing power after CV=30% if point estimator is 1.1, same as we have had here for point estimator = 0.95.
It would be interesting to know how good the real values of the simulated power are in accordance with our naive power calculations, not only the qualitative behaviour.

Seems I had read all this stuff, but never had this figured out well.
What we here see is the mean vs. variance trade-off in the scaled ABE evaluation. Greater differences in the means µTR are allowed with increasing variability to have the same value for the scaled ABE criterion.
Eventually this is one of the sources for introducing the GMR constraint?

Regards,

Detlew
ElMaestro
★★★

Denmark,
2011-01-21 13:59
(4815 d 12:44 ago)

@ Helmut
Posting: # 6470
Views: 28,469
 

 Never eaten Cadmium deliberately

Ahoy HS,

❝ ❝ Moreover the classical power formulas have nowhere the scABE constraint "point est. must be within 0.8-1.25" as presupposition.


❝ We can't incoporate a political constraint in an explicit statistical formula. The only way IMHO would be to go with Monte Carlo simulations.


I can't imagine this is really a big deal, because the chance that a PE is outside 0.8 - 1.25 while the CI still evaluates to BE must be next to nothing.

Pass or fail!
ElMaestro
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2011-01-21 15:05
(4815 d 11:38 ago)

@ ElMaestro
Posting: # 6473
Views: 28,525
 

 Simulants of the world, unite!

Ahoy ElMeastro!

❝ ❝ We can't incoporate a political constraint in an explicit statistical formula. The only way IMHO would be to go with Monte Carlo simulations.


❝ I can't imagine this is really a big deal, because the chance that a PE is outside 0.8 - 1.25 while the CI still evaluates to BE must be next to nothing.


To quote from L. Tóthfalusi et al. (2009), p.739:

It is interesting to note the effect of the GMR constraint on the overall performance, notably on the producer risk of bioequivalence determinations. This effect depends on the comparative positions of the three criteria: the GMR constraint, the regulatory limit for SABE, and the estimated scaling variance. Depending on the relative magnitudes of these parameters, either SABE or the GMR restriction can become the dominant regulatory criterion. For instance, with a constraint of 0.80–1.25 on the GMR, when both the switching and scaling variations are 30%, then the combined criteria of SABE and the GMR restriction have, at moderately high within-subject variability (CV = 35%), almost the same proportion of regulatory approvals as SABE alone. In contrast, at substantially higher within-subject variability (CV = 60%), the proportion of approvals with the combined criteria is very similar to that with just the GMR constraint alone.


Have a look at Fig.2B of

Endrényi L and L Tóthfalusi
Regulatory conditions for the determination of bioequivalence of highly variable drugs
J Pharm Pharmaceut Sci 12 (1): 138-149 (2009)
online

[image]

The GMR constraint was 1.25, filled diamonds are the EMA's method (filled circles conventional ABE, open squares unconstrained SABE, open triangles PE 0.8-125 without CI = Canada Cmax). Simulation: 10,000 studies, 3-period replicate, true GMR 1.0-1.6.
Due to the variability inherent to HVDs almost 40% pass at 1.25 and still ≈20% at 1.35.

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
ElMaestro
★★★

Denmark,
2011-01-21 15:52
(4815 d 10:51 ago)

@ Helmut
Posting: # 6475
Views: 28,660
 

 Simulants of the world, unite!

Thanks HS.

My intuition -which is most often counteracting reasonable decisions- tells me something needs to be dug into here.
E&T's paper says they do simulations and evaluate the simulated data with a simplified method by Hyslop. The reference (Hyslop et al. 2000) which I don't have is about IBE rather than ABE. Do you have it? Can you shed light onto this?
Who's got some working R-code for 223-ABE evaluation (linear mixed model that specifies the covariance matrix with within-sigmas for the ref when the test is not replicated; I don't know how to do this)?

Pass or fail!
ElMaestro
d_labes
★★★

Berlin, Germany,
2011-01-21 16:28
(4815 d 10:15 ago)

@ ElMaestro
Posting: # 6476
Views: 28,579
 

 Hyslop, Howe, scaled ABE and that all

Dear ElMaestro,

❝ E&T's paper says they do simulations and evaluate the simulated data with a simplified method by Hyslop. The reference (Hyslop et al. 2000) which I don't have is about IBE rather than ABE. Do you have it? Can you shed light onto this?


See here and especially here for some discussions about how to calculate the scaled ABE criterion (linearized) including it's upper 95% CI according to Hyslop's method, sometimes the name Howe is also used.

The SAS code given in the FDA Progesterone guidance can be rewritten for R with not so much difficulties I think. But a full working version I don't have.

Regards,

Detlew
ElMaestro
★★★

Denmark,
2011-01-21 16:45
(4815 d 09:58 ago)

@ d_labes
Posting: # 6477
Views: 28,473
 

 Hyslop, Howe, scaled ABE and that all

Thanks dlabes,

I am not sure I follow the code.
As I indicated earlier, I'd be a little apprehensive at least for the case of imbalance between sequences; HOWEver (:-D) I assume simulations imply balanced seqs. Did Hyslop or whoever validate it against the (a) 'correct' linear mixed model under balance?

Correction: Sorry, I meant something else than I initially wrote.
It is missing values that is the concern issue because of the difference between a normal linear model and the reml approach by a mixed model.

Pass or fail!
ElMaestro
d_labes
★★★

Berlin, Germany,
2011-01-21 17:19
(4815 d 09:24 ago)

@ ElMaestro
Posting: # 6478
Views: 28,818
 

 scABE and missings

Hi ElMaestro

❝ Correction: Sorry, I meant something else than I initially wrote. It is missing values that is the concern issue because of the difference between a normal linear model and the reml approach by a mixed model.


Good question! Next question please :-D.

To be honest: Don't know exactly. In the Progesterone guidance it is written "... Further assume that there are no missing observations ...". But only under the Heading "Example SAS Codes: fully replicated 4-way design".

My observation is that this guidance is in some instances rather vague or gives no sufficient explanation why what is done that way. Just to name "the unknown x = estimate2 - stderr2" or "use GLM for partial replicate and MIXED for full replicate".

Regards,

Detlew
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2011-01-21 19:41
(4815 d 07:02 ago)

@ ElMaestro
Posting: # 6479
Views: 28,581
 

 Intuition

Ahoy ElMaestro!

❝ My intuition -which is most often counteracting reasonable decisions- tells me something needs to be dug into here.


I try not to think with my gut. If I’m serious about understanding the world, thinking with anything besides my brain, as tempting as that might be, is likely to get me into trouble.
Carl Sagan (The Demon-Haunted World: Science as a Candle in the Dark, Ch. 11 »The Dragon in My Garage«, 1995)


To be honest I'm struggling in preventing my little brain from overheating. My rumbling gut is uncomfortable with the 'fact' (?) that with any given sample size I have a higher chance of success for higher CVs.

❝ The reference (Hyslop et al. 2000) which I don't have is about IBE rather than ABE. Do you have it?

  1. Yes.
  2. Somewhere in one of my piles of paper (I’m facing a major backlog in archiving publications)…
An appetizer:

T Hyslop and B Iglewicz
Alternative Cross-over Designs for Individual Bioequivalence
Proceedings of the Annual Meeting of the ASA, August 5-9, 2001
online resource
Go and get a magnifying glass in order to read the tables.


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
ElMaestro
★★★

Denmark,
2011-01-20 16:34
(4816 d 10:09 ago)

@ d_labes
Posting: # 6458
Views: 29,438
 

 Never eaten Cadmium deliberately

Dear dlabes,

Thanks for your continued support to my lack of understanding :-D
I cannot rule out the possibility that my metal poisoning is a factor in my posts.

❝ What I meant with my sentence is that using the original scaled ABE criterion

  (µT-µR)2/s2WR < (theta/sw0)2

❝ would let to power calculations that are independent from the variabilities, at least at true µT-µR=0.


At T/R equal to 1 power and variability is independent.
At T/R not equal to 1 it becomes unclear. As the intention with scaling is to keep power constant with varying CV one should/can not always assume T/R being one, I mean. My code would be attempt at calculating the limits that preserve constant power with varied CV where T/R is anything the user specifies.
With this function, curves for acceptance range as function of CV can be constructed for any combo of T/R and N while the power is kept constant.

Pass or fail!
ElMaestro
d_labes
★★★

Berlin, Germany,
2011-01-20 17:06
(4816 d 09:37 ago)

@ ElMaestro
Posting: # 6459
Views: 28,612
 

 Use of Cadmium

Dear ElMaestro,

❝ With this function, curves for acceptance range as function of CV can be constructed for any combo of T/R and N while the power is kept constant.


Oh I see! But for what end?
I understand the EMA widened acceptance ranges as applicable regardless of point estimate obtained.

Regards,

Detlew
ElMaestro
★★★

Denmark,
2011-01-20 17:52
(4816 d 08:51 ago)

@ d_labes
Posting: # 6461
Views: 28,585
 

 Use of Cadmium

Dear dlabes,

❝ Oh I see! But for what end?

❝ I understand the EMA widened acceptance ranges as applicable regardless of point estimate obtained.


A good point to make. On the other hand some people find pleasure in discussing if 0.760 is meaningful or if it should be 17 decimals. In this case I think it is a matter of doing what the guidelines says or doing what the guideline intends. I would expects this to be something you can discuss.

The code above does not assume anything other than what the ordinary (and widely accepted power routines) do. I envisage Helmut examining the acceptance range for T/R deviating from 1 and comparing it to the EMA curve and presenting such stuff at a conference. Heck if he doesn't do it, I will.

Here is a divide-and-conquer approach to the problem (simpler but not really faster :-D):
I_Eat_Cadmium2 <- function(P, TR, CV, alpha, N)
{
   AL3=0.9999;
   AL1=0.0001;

   while ((AL3-AL1)>0.000001)
    {
      AL2=0.5*(AL3+AL1); ##yes yes, I know, why not log midpoints etc...
      P1=Pwr223(N, alpha, AL1, 1/AL1, TR, CV);
      P2=Pwr223(N, alpha, AL2, 1/AL2, TR, CV);
      P3=Pwr223(N, alpha, AL3, 1/AL3, TR, CV);
     
      if ((P<P2) && (P>P3))
                 {
                   AL1=AL2;
                 } else AL3=AL2;
     
    }
   ##cat("Acc Lim Lo: ", AL2, "\n");
   ##cat("Acc Lim Hi: ", 1/AL2, "\n");
   AL2
}

Pass or fail!
ElMaestro
ElMaestro
★★★

Denmark,
2011-01-20 18:53
(4816 d 07:49 ago)

@ d_labes
Posting: # 6462
Views: 28,930
 

 Use of Cadmium

OK, here what I meant with my last posts and the gibberish code.

[image]

We have for instance 24 patients in a 2,2,3-BE trial, expected T/R being 1.0 and expected CV is 30%. This gives us a power of 0.87. Scaling preserves power. Thus should the variability be 50% and with preserved power we have 0.6983 as our lower acceptance range and 1.4320 as the upper. Wunderbar. This is the blue line, or shall we call it the EMA line.

I propose to check how the behavior is once the expected R/T diviates from 1.0 and being 0.95 (red), 0.90 (yellow) and 0.85 (green); these curves preserve the power within themselves but of course not between them. It was intended as a graphical illustration of the limitation of the EMA approximation when T/R differs from 1.0.

Note: We are now no longer so intimately connected with the original thread topic.

Pass or fail!
ElMaestro
UA Flag
Activity
 Admin contact
22,957 posts in 4,819 threads, 1,636 registered users;
71 visitors (0 registered, 71 guests [including 8 identified bots]).
Forum time: 02:43 CET (Europe/Vienna)

With four parameters I can fit an elephant,
and with five I can make him wiggle his trunk.    John von Neumann

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