Why not base 🇷? [Power / Sample Size]
the function
CI.RatioF()
can only handle parallel and 2×2×2 crossover designs but you have a replicate.You mastered the evaluation in Excel.
Alternatively an -script following the FDA’s guidance (the raw data are given in Table AIV.6 of the 1995 guidance). The FDA took accurate calculations lightly (e.g., (–43.63 + –34.36) / 2 ≠ –38.99!).
raw <- read.delim(file = "https://bebac.at/downloads/FDA162457Example.csv")
# Cave: only for complete data!
m <- function(x, treatment, sites) {
(x$AUEC[x$treatment == treatment & x$site == sites[1]] +
x$AUEC[x$treatment == treatment & x$site == sites[2]]) / 2
}
sites <- unique(raw$site)
Y <- data.frame(subject = unique(raw$subject),
T = m(raw, "T", sites), R = m(raw, "R", sites))
X.T <- mean(Y$T)
X.R <- mean(Y$R)
s2.TT <- var(Y$T) # in the guidance standard deviation σ
s2.RR <- var(Y$R) # but actually sample variances
s2.TR <- cov(Y$T, Y$R)
pe <- X.T / X.R
n <- nrow(Y)
t <- qt(p = 0.95, df = n - 1)
G <- t^2 * s2.RR / (n * X.R^2)
if (G >= 1) {
cat("With G =", G, "the study does not meet the in vivo bioequivalence requirements.\n")
} else {
K <- pe^2 + s2.TT / s2.RR * (1 - G) + s2.TR / s2.RR * (G * s2.TR / s2.RR - 2 * pe)
ci <- setNames(c(100 * ((pe - G * s2.TR / s2.RR) + c(1, -1) * t / X.R *
sqrt(s2.RR / n * K)) / (1 - G)), c("lower", "upper"))
i <- "With a 90% confidence interval of"
p <- "the study passed bioequivalence.\n"
f <- "the study failed to show bioequivalence.\n"
if (ci[["lower"]] >= 80 & ci[["upper"]] <= 125) {
cat(sprintf("%s %.1f\u2013%.1f%% %s", i, ci[["lower"]], ci[["upper"]], p))
} else {
cat(sprintf("%s %.1f\u2013%.1f%% %s", i, ci[["lower"]], ci[["upper"]], f))
}
}
With a 90% confidence interval of 53.6–165.9% the study failed to show bioequivalence.
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
Helmut Schütz
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
Complete thread:
- how to construct confidence interval for un-transformed metric? lizhao 2016-02-17 19:01 [Power / Sample Size]
- how to construct confidence interval for un-transformed metric? jag009 2016-02-17 20:43
- how to construct confidence interval for un-transformed metric? mittyri 2016-02-17 22:34
- Fieller’s confidence interval Helmut 2016-02-18 13:38
- Fieller’s confidence interval lizhao 2016-02-22 20:20
- Fieller’s confidence interval yjlee168 2016-02-23 08:23
- Rescue approaching – PowerTOST d_labes 2016-02-23 09:08
- Rescue approaching – PowerTOST Weidson 2024-11-28 23:15
- Why not base 🇷?Helmut 2024-12-03 13:39
- Rescue approaching – PowerTOST Weidson 2024-11-28 23:15
- Fieller’s confidence interval lizhao 2016-02-22 20:20
- Fieller’s confidence interval Helmut 2016-02-18 13:38