Alternative CI for BE decision [Power / Sample Size]
Dear zizou,
all you have written about CI(s) is more or less correct.
But it's a misunderstanding.
The basic test to use for the BE decision is TOST with alpha = 0.05 by convention. And this is operationally identical to the interval inclusion rule, conventionally using an ordinary 1-2*alpha CI.
The Berger, Hsu alternative CI+ is another CI (an 1-alpha CI) constructed based on TOST and gives the same result if used as decision rule for stating BE.
Code to show this via simulations:
And now try:
Quod errat demonstrandum. At least for CV=0.2, n=24 and GMR=0.95
.
BTW: It's not necessary to rely on simulations. The EMA BSWP f.i. doesn't like simulations
. You may consider different cases for lCL, uCL to show that the alternative CI+ gives always the same decision as the usual 1-2*alpha CI.
F.i.:
If the usual CI is within the acceptance range (with upper CL below 1) -> decide BE
Then the alternative CI with upper CL set to 1 is also in the acceptance range -> decide BE.
And so on for other constellations.
all you have written about CI(s) is more or less correct.
But it's a misunderstanding.
The basic test to use for the BE decision is TOST with alpha = 0.05 by convention. And this is operationally identical to the interval inclusion rule, conventionally using an ordinary 1-2*alpha CI.
The Berger, Hsu alternative CI+ is another CI (an 1-alpha CI) constructed based on TOST and gives the same result if used as decision rule for stating BE.
Code to show this via simulations:
power.sim2x2 <- function(CV, GMR, n, nsims=1E5, alpha=0.05, lBEL=0.8, uBEL=1.25,
CItype=c("usual", "alternative"), setseed=TRUE, details=FALSE)
{
ptm <- proc.time()
if(setseed) set.seed(123456)
# check CItype
CI <- match.arg(CItype)
# n is total if given as simple number
# to be correct n must then be even!
if (length(n)==1) {
nsum <- n
fact <- 2/n
}
if (length(n)==2) {
nsum <- sum(n)
fact <- 0.5*sum(1/n)
}
mse <- log(1.0 + CV^2)
df <- nsum-2
tval <- qt(1-alpha,df)
# Attention! With nsims=1E8 memory of my machine (4 GB) is too low
# Thus work in chunks of 1E6 if nsims>1E6.
chunks <- 1
ns <- nsims
if (nsims>1e6) {
chunks <- trunc(nsims/1E6)
ns <- 1E6
if (chunks*1e6!=nsims){
nsims <- chunks*1e6
warning("nsims truncated to", nsims)
}
}
BEcount <- 0
sdm <- sqrt(fact*mse)
mlog <- log(GMR)
for (i in 1:chunks)
{
# simulate sample mean via its normal distribution
means <- rnorm(ns, mean=mlog, sd=sdm)
# simulate sample mse via chi-square distribution of df*mses/mse
mses <- mse*rchisq(ns,df)/df
hw <- tval*sqrt(fact*mses)
lCL <- means - hw
uCL <- means + hw
if(CI=="alternative"){
# CI+, i.e. expand CI to contain GMR=1
lCL <- ifelse(lCL<0, lCL, 0)
uCL <- ifelse(uCL>0, uCL, 0)
}
# point <- exp(means)
lCL <- exp(lCL)
uCL <- exp(uCL)
# standard check if CI of GMR (usual or alternative)
# is in 0.8-1.25 (without rounding CI limits)
BE <- (lBEL<=lCL & uCL<=uBEL)
BEcount <- BEcount + sum(BE)
}
if (details) {
cat(nsims,"sims. Time elapsed (sec):\n")
print(proc.time()-ptm)
}
BEcount/nsims
}
And now try:
power.sim2x2(CV=0.2, n=24, GMR=0.95, CItype="usual")
[1] 0.89572
power.sim2x2(CV=0.2, n=24, GMR=0.95, CItype="alternative")
[1] 0.89572
Quod errat demonstrandum. At least for CV=0.2, n=24 and GMR=0.95

BTW: It's not necessary to rely on simulations. The EMA BSWP f.i. doesn't like simulations

F.i.:
If the usual CI is within the acceptance range (with upper CL below 1) -> decide BE
Then the alternative CI with upper CL set to 1 is also in the acceptance range -> decide BE.
And so on for other constellations.
—
Regards,
Detlew
Regards,
Detlew
Complete thread:
- Denmark Curiosa (1 in 90% CI in 0.8-1.25) zizou 2017-02-05 02:03 [Power / Sample Size]
- Kudos! Helmut 2017-02-05 19:16
- Kudos! ElMaestro 2017-02-05 21:15
- Joking! Helmut 2017-02-06 13:27
- Thanks, and DKMA ElMaestro 2017-02-06 13:46
- Power with a Danish twist Helmut 2017-02-07 15:23
- Danish ultra-conservatism d_labes 2017-02-08 10:57
- Danish ultra-conservatism Helmut 2017-02-08 11:47
- Danish ultra-conservatism d_labes 2017-02-08 10:57
- Power with a Danish twist Helmut 2017-02-07 15:23
- Thanks, and DKMA ElMaestro 2017-02-06 13:46
- Kudos to ElMaestro! d_labes 2017-02-06 15:06
- Plausible Helmut 2017-02-06 17:16
- Plausible to me too d_labes 2017-02-06 20:25
- Plausible to me too ElMaestro 2017-02-06 22:30
- Plausible to me too zizou 2017-02-06 22:42
- THX d_labes 2017-02-07 10:01
- Plausible to me too d_labes 2017-02-06 20:25
- Plausible Helmut 2017-02-06 17:16
- Joking! Helmut 2017-02-06 13:27
- Kudos! ElMaestro 2017-02-05 21:15
- 3D Helmut 2017-02-06 13:47
- Denmark Curiosa (1 in 90% CI in 0.8-1.25) d_labes 2017-02-06 14:54
- Denmark Curiosa (1 in 90% CI in 0.8-1.25) zizou 2017-02-08 21:03
- Alternative CI for BE decisiond_labes 2017-02-09 11:18
- Alternative CI for BE decision ElMaestro 2017-02-09 11:36
- Alternative CI for BE decision d_labes 2017-02-09 11:48
- How decidedly odd ElMaestro 2017-02-09 13:28
- How decidedly odd zizou 2017-02-09 14:42
- How decidedly odd ElMaestro 2017-02-09 13:28
- Alternative CI for BE decision Helmut 2017-02-09 13:41
- No alternative d_labes 2017-02-09 20:37
- No alternative ElMaestro 2017-02-10 13:51
- No alternative? mittyri 2017-02-10 15:28
- Dinamarka? d_labes 2017-02-10 20:10
- OT: Czech beer d_labes 2017-02-10 19:57
- No alternative? mittyri 2017-02-10 15:28
- No alternative ElMaestro 2017-02-10 13:51
- No alternative d_labes 2017-02-09 20:37
- Alternative CI for BE decision d_labes 2017-02-09 11:48
- Alternative CI for BE decision ElMaestro 2017-02-09 11:36
- Alternative CI for BE decisiond_labes 2017-02-09 11:18
- Denmark Curiosa (1 in 90% CI in 0.8-1.25) zizou 2017-02-08 21:03
- Denmark Curiosa (1 in 90% CI in 0.8-1.25): Gone Helmut 2019-11-08 12:47
- Kudos! Helmut 2017-02-05 19:16