Advanced example [🇷 for BE/BA]
❝ Beware! Here you are on very slippery ground.
Full ACK!
❝ Have a look f.i. into this post.
THX for pointing to this oldie! Below an advanced example. Sometimes both AUC and Cmax are highly variable. According to the EMA we are allowed to widen the limits only for the latter. Which PK-metric will drive the sample size? How large should it be? Which power can we expect for the other metric? How far can T deviate from R whilst still keeping power?
#### input section start ####
CV.Cmax <- 0.55 # HVD/HVDP
CV.AUC <- 0.40 # as well!
TR.Cmax <- 0.90 # suggested for HVDs/HVDPs
TR.AUC <- 0.90 # same! May change to a nicer value if CV <0.3
pwr <- 0.8 # target
#### input section end ####
library(PowerTOST)
f1 <- function(x) power.scABEL(CV=CV.Cmax, theta0=x,
n=n1.AUC, des=des)-pwr
f2 <- function(x) power.TOST(CV=CV.AUC, theta0=x,
n=n1.Cmax, des=des)-pwr
ifelse(CV.Cmax <= 0.5, LL <- exp(-0.76*CV2se(CV.Cmax)),
LL <- exp(-0.76*CV2se(0.5))) # lower scaled limit
if (CV.Cmax <= 0.3) LL <- 0.8 # lower conventional limit
res <- matrix(nrow=2, ncol=7, byrow=T, dimnames=list(NULL,
c("Method", "metric", "GMR", "CV", "n",
"power", "GMRlo")))
res.Cmax <- sampleN.scABEL(CV=CV.Cmax, theta0=TR.Cmax,
targetpower=pwr, des=des,
details=F, print=F) # scaling allowed
n1.Cmax <- res.Cmax[["Sample size"]]
pwr.Cmax <- res.Cmax[["Achieved power"]]
res.AUC <- sampleN.TOST(CV=CV.AUC, theta0=TR.AUC,
targetpower=pwr, des=des,
print=F) # ABE
n1.AUC <- res.AUC[["Sample size"]]
pwr.AUC <- res.AUC[["Achieved power"]]
if(n1.Cmax >= n1.AUC) {
pwr.AUC <- power.TOST(CV=CV.AUC, theta0=TR.AUC, n=n1.Cmax,
des=des)
TR.AUC.min <- uniroot(f2, interval=c(0.8, TR.AUC), tol=1e-6)$root
cat(paste0("PK metric driving the sample size: Cmax\n",
"Sample size: ", n1.Cmax, " (ABEL, power: ",
sprintf("%.4f", pwr.Cmax), ")\n",
"Power of AUC (ABE): ", sprintf("%.4f", pwr.AUC), "\n",
"Lowest T/R-ratio of AUC which will give ", pwr, " power: ",
sprintf("%.4f", TR.AUC.min), "\n"))
res[1, ] <- c("ABEL", "Cmax", sprintf("%.2f", TR.Cmax),
sprintf("%.2f", CV.Cmax), n1.Cmax,
sprintf("%.4f", pwr.Cmax), NA)
res[2, ] <- c("ABE", "AUC", sprintf("%.2f", TR.AUC),
sprintf("%.2f", CV.AUC), n1.Cmax,
sprintf("%.4f", pwr.AUC),
sprintf("%.4f", TR.AUC.min))
} else {
pwr.Cmax <- power.scABEL(CV=CV.Cmax, theta0=TR.Cmax, n=n1.AUC,
des=des)
TR.Cmax.min <- uniroot(f1, interval=c(LL, TR.Cmax), tol=1e-6)$root
cat(paste0("PK metric driving the sample size: AUC\n",
"Sample size: ", n1.AUC, " (ABE, power: ",
sprintf("%.4f", pwr.AUC), ")\n",
"Power of Cmax (ABEL): ", sprintf("%.4f", pwr.Cmax), "\n",
"Lowest T/R-ratio of Cmax which will give ", pwr, " power: ",
sprintf("%.4f", TR.Cmax.min), "\n"))
res[1, ] <- c("ABE", "AUC", sprintf("%.2f", TR.AUC),
sprintf("%.2f", CV.AUC), n1.AUC,
sprintf("%.4f", pwr.AUC), NA)
res[2, ] <- c("ABEL", "Cmax", sprintf("%.2f", TR.Cmax),
sprintf("%.2f", CV.Cmax), n1.AUC,
sprintf("%.4f", pwr.Cmax),
sprintf("%.4f", TR.Cmax.min))
}
res <- data.frame(res)
print(res, row.names=F)
PK metric driving the sample size: AUC
Sample size: 68 (ABE, power: 0.8072)
Power of Cmax (ABEL): 0.9700
Lowest T/R-ratio of Cmax which will give 0.8 power: 0.8435
Method metric GMR CV n power GMRlo
ABE AUC 0.90 0.40 68 0.8072 <NA>
ABEL Cmax 0.90 0.55 68 0.9700 0.8435
If we would be allowed to scale both, we would perform the study in 30 subjects and the T could not deviate more than ~10% from R in order to obtain ~80% power.
OK, let’s say AUC is not highly variable (CV 0.25) and we assume a T/R-ratio of 0.95. CV of Cmax is 0.35 (still T/R 0.90):
PK metric driving the sample size: Cmax
Sample size: 34 (ABEL, power: 0.8118)
Power of AUC (ABE): 0.9917
Lowest T/R-ratio of AUC which will give 0.8 power: 0.8892
Method metric GMR CV n power GMRlo
ABEL Cmax 0.90 0.35 34 0.8118 <NA>
ABE AUC 0.95 0.25 34 0.9917 0.8892
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
![[image]](https://static.bebac.at/img/CC by.png)
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- Power calculation BE-proff 2015-08-13 13:44 [🇷 for BE/BA]
- Power calculation Helmut 2015-08-13 13:59
- Power calculation BE-proff 2015-08-13 14:44
- Example(s) Helmut 2015-08-13 14:58
- Power parallel group: PowerTOST/SAS/PASS d_labes 2015-08-14 10:29
- Power parallel group: PowerTOST/SAS/PASS Helmut 2015-08-14 15:34
- Power parallel group: PowerTOST/SAS/PASS d_labes 2015-08-14 10:29
- Slippery ground d_labes 2015-08-14 10:50
- Advanced exampleHelmut 2015-08-14 16:41
- Advanced example for 2X2X2 mittyri 2015-08-14 19:40
- Spaghetti viennese Helmut 2015-08-15 03:22
- Spaghetti viennese d_labes 2015-08-17 08:45
- Spaghetti viennese Helmut 2015-08-15 03:22
- Advanced example BE-proff 2015-08-17 08:55
- Advanced example for 2X2X2 mittyri 2015-08-14 19:40
- Advanced exampleHelmut 2015-08-14 16:41
- Example(s) Helmut 2015-08-13 14:58
- Power calculation BE-proff 2015-08-13 14:44
- Power calculation Helmut 2015-08-13 13:59