How decidedly odd [Power / Sample Size]

posted by zizou – Plzeň, Czech Republic, 2017-02-09 14:42  – Posting: # 17046
Views: 19,285

(edited by zizou on 2017-02-09 15:03)

Dear ElMaestro,
what a pity, maybe it was not the perfect protocol. Look at this:

We could go further. Maybe you meant so, as you wrote:
» Why not just go all the way and adjust all CI's so that they span across 1.0 ...
From this reply it seems to another CI - 90% Westlake’s symmetrical confidence interval - different story.

Nevertheless what about another alternative CI (sometimes 1-alpha CI, sometimes 100% CI, and sometimes something between) which is constructed based on TOST and BE decision is not affected as well.

CI++ = (low, 1/low)     if  high < 1/low
CI++ = (1/high, high)   if   low > 1/high
CI++ = (low, high)      if   low = 1/high

where low and high are the classical 90% confidence interval limits.

I added the CI.9x to simulations (Aaron Zeng R code for TOST CI simulation):
set.seed(20140313)
R100 <- 0.51 # Reference mean
T100 <- 0.95*R100 # simulate data under alternative H, assume equal, one can change this. - Yes, I changed this.
D.true <- T100 - R100
sigma <- 0.1
alpha <- 0.05

n <- 100 # sample size
# simulate 100 coverage probabilities, compute means.
sim.num <- 100
# generate 1000 confidence intervals for computing coverage probability
rep <- 1000
 
coverge.ci90 <- NULL
coverge.ci95 <- NULL
coverge.ci9x <- NULL
for(k in 1:sim.num) {
 ci.90 <- NULL
 ci.95 <- NULL
 ci.9x <- NULL
 
 for(i in 1:rep) {
 # simulate data for Reference group
 samp.R100 <- rnorm(n, mean=R100, sd=sigma)
 samp.T100 <- rnorm(n, mean=T100, sd=sigma)
 
 D.mean <- mean(samp.T100 - samp.R100)
 # Assume equal variance, use pooled variance
 s.pool <- sqrt((n-1)*var(samp.R100)/(2*n-2) + (n-1)*var(samp.T100)/(2*n-2))
 D.se <- s.pool*sqrt(1/n + 1/n)
 
 ci.90 <- rbind(ci.90, c(D.mean - qt(1-alpha, df = 2*n-2)*D.se,
 D.mean + qt(1-alpha, df = 2*n-2)*D.se))
 ci.95 <- rbind(ci.95, c(min(0, D.mean - qt(1-alpha, df = 2*n-2)*D.se),
 max(0, D.mean + qt(1-alpha, df = 2*n-2)*D.se)))
 ci.9x <- rbind(ci.9x, c(min(D.mean - qt(1-alpha, df = 2*n-2)*D.se, -(D.mean + qt(1-alpha, df = 2*n-2)*D.se)),
 max(-(D.mean - qt(1-alpha, df = 2*n-2)*D.se), D.mean + qt(1-alpha, df = 2*n-2)*D.se)))
 }
 coverge.ci90 <- c(coverge.ci90, sum(1*((ci.90[, 1] <= D.true) & (ci.90[, 2] >= D.true)))/rep)
 coverge.ci95 <- c(coverge.ci95, sum(1*((ci.95[, 1] <= D.true) & (ci.95[, 2] >= D.true)))/rep)
 coverge.ci9x <- c(coverge.ci9x, sum(1*((ci.9x[, 1] <= D.true) & (ci.9x[, 2] >= D.true)))/rep)
}
 
mean(coverge.ci90)
#[1] 0.90086
mean(coverge.ci95)
#[1] 0.95091 (for T100=R100 the value is 1, otherwise the value is 0.95)
mean(coverge.ci9x)
#[1] 0.97507 (for different input the value seems to be from 0.95 to 1)


So when we let the 90% CI go, we can have nice (9x%) CI around 1, with alpha 0.05.
Pretty! ... Or ... Pretty nasty!

ElMaestro: You should try to buy a liter of milk for 1 Euro to verify this. :-D

Complete thread:

Activity
 Admin contact
20,797 posts in 4,354 threads, 1,445 registered users;
online 8 (0 registered, 8 guests [including 2 identified bots]).
Forum time: 15:19 CEST (Europe/Vienna)

The function of genius is not to give new answers, but to pose
new questions which time and mediocrity can resolve.    H.R. Trevor-Roper

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