Script kiddy [RSABE / ABEL]

posted by Helmut Homepage – Vienna, Austria, 2016-12-21 19:09 (2674 d 11:51 ago) – Posting: # 16871
Views: 4,991

Hi Detlew!

I guess BE-proff was referring to this post.

This one should do it all:

library(PowerTOST)
regulator <- "EMA" # "EMA" or "HC"
CV        <- 0.25
theta0    <- 1.15
design    <- "2x2x4"
n         <- c(23, 22)
alpha.pre <- 0.0444
BE.H0 <- CI.H0 <- PE.H0 <- TRUE
res       <- scABEL.ad(CV=CV, theta0=theta0, design=design,
                       n=n, alpha.pre=alpha.pre, print=FALSE)
reg       <- reg_const(regulator=regulator)
AR        <- scABEL(CV=CV, regulator=regulator)
if (is.na(res$alpha.adj)) {
  CI  <- CI.BE(alpha=res$alpha, pe=theta0, CV=CV, n=n, design=design)
} else {
  CI  <- CI.BE(alpha=res$alpha.adj, pe=theta0, CV=CV, n=n, design=design)
}
if (CI[["lower"]] > AR[["lower"]] & CI[["upper"]] < AR[["upper"]]) CI.H0 <- FALSE
if (theta0 > 0.8 & theta0 < 1.25) PE.H0 <- FALSE
if (sum(PE.H0, PE.H0) == 0) BE.H0 <- FALSE
txt <- paste("\nDesign             :", design,
    "\nSubjects / sequence:", paste0(n, collapse=" / "),
    sprintf("\nCVwR               : %.2f%%", 100*CV))
if (CV > 0.3) {
  txt <- paste(txt, "(reference-scaling applicable)",
         "\nRegulatory settings:", regulator,
         sprintf("\nCVswitch           : %.2f%%", 100*reg$CVswitch),
         sprintf("\nCVcap              : %.2f%%", 100*reg$CVcap),
         sprintf("\nRegulatory constant: %.3f", reg$r_const))
}
txt <- paste(txt, sprintf("\nNominal \u03B1          : %.4f", res$alpha),
       sprintf("(TIE %.4f)", res$TIE.unadj))
if (!is.na(res$alpha.adj)) {
  txt <- paste(txt, sprintf("\nIteratively adj. \u03B1 : %.4f", res$alpha.adj),
              sprintf("(TIE %.4f)", res$TIE.adj))
}
  txt <- paste(txt, sprintf("\nPoint estimate     : %6.2f%%", 100*theta0),
         sprintf("\nAcceptance range   : %6.2f %s %6.2f%%",
                                    100*AR[["lower"]], "\u2013",
                                    100*AR[["upper"]]))
if (AR[["lower"]] < 0.8) {
  txt <- paste(txt, "(expanded = \'ABEL\')")
} else
  txt <- paste(txt, "(conventional)")
}
if (is.na(res$alpha.adj)) {
  txt <- paste(txt, sprintf("\n%5.2f%% CI          :", 100*(1-2*res$alpha)))
} else {
  txt <- paste(txt, sprintf("\n%5.2f%% CI          :", 100*(1-2*res$alpha.adj)))
}
txt <- paste(txt, sprintf("%6.2f %s %6.2f%%",
                          100*CI[["lower"]], "\u2013",
                          100*CI[["upper"]]),
    "\nAssessment:")
if (!CI.H0) {
  txt <- paste(txt, "\n  Confidence interval entirely within acceptance range.")
} else {
  txt <- paste(txt, "\n  Confidence interval not entirely within acceptance range.")
}
if (CV < 0.3) {
  if (!CI.H0) {
    txt <- paste(txt, "\n  Passed (ABE shown).\n")
  } else {
    txt <- paste(txt, "\n  Failed (ABE not shown).\n")
  }
} else {
  if (!PE.H0) {
    txt <- paste(txt, "\n  Point estimate within 80.00 \u2013 125.00%.")
  } else {
    txt <- paste(txt, "\n  Point estimate not within 80.00 \u2013 125.00%.")
  }
  if (sum(CI.H0, BE.H0) == 0) {
    txt <- paste(txt, "\n  Passed both criteria (ABEL shown).\n")
  } else {
    txt <- paste(txt, "\n  Failed at least one criterion (ABEL not shown).\n")
  }
}
cat(txt)


Voilà!

Design             : 2x2x4
Subjects / sequence: 23 / 22
CVwR               : 38.00% (reference-scaling applicable)
Regulatory settings: EMA
CVswitch           : 30.00%
CVcap              : 50.00%
Regulatory constant: 0.760
Nominal α          : 0.0500 (TIE 0.0549)
Iteratively adj. α : 0.0391 (TIE 0.0500)
Point estimate     : 115.00%
Acceptance range   :  75.65 – 132.20% (expanded = 'ABEL')
92.18% CI          : 104.35 – 126.74%
Assessment:
  Confidence interval entirely within acceptance range.
  Point estimate within 80.00 – 125.00%.
  Passed both criteria (ABEL shown).


Higher CVwR 41% when the inflation of the Type I Error will hit no more:

Design             : 2x2x4
Subjects / sequence: 23 / 22
CVwR               : 41.00% (reference-scaling applicable)
Regulatory settings: EMA
CVswitch           : 30.00%
CVcap              : 50.00%
Regulatory constant: 0.760
Nominal α          : 0.0500 (TIE 0.0478)
Point estimate     : 115.00%
Acceptance range   :  74.11 – 134.93% (expanded = 'ABEL')
90.00% CI          : 104.33 – 126.76%
Assessment:
  Confidence interval entirely within acceptance range.
  Point estimate within 80.00 – 125.00%.
  Passed both criteria (ABEL shown).


CVwR 28%; no reference-scaling but still some adjustment required:

Design             : 2x2x4
Subjects / sequence: 23 / 22
CVwR               : 28.00%
Nominal α          : 0.0500 (TIE 0.0547)
Iteratively adj. α : 0.0404 (TIE 0.0500)
Point estimate     : 115.00%
Acceptance range   :  80.00 – 125.00% (conventional)
91.93% CI          : 107.00 – 123.60%
Assessment:
  Confidence interval entirely within acceptance range.
  Passed (ABE shown).


Even lower CVwR 27%:

Design             : 2x2x4
Subjects / sequence: 23 / 22
CVwR               : 27.00%
Nominal α          : 0.0500 (TIE 0.0494)
Point estimate     : 115.00%
Acceptance range   :  80.00 – 125.00% (conventional)
90.00% CI          : 107.71 – 122.79%
Assessment:
  Confidence interval entirely within acceptance range.
  Passed (ABE shown).


CVwR 80% (!) and point estimate 124% (‼) for Health Canada’s conditions. Amazing.

Design             : 2x2x4
Subjects / sequence: 23 / 22
CVwR               : 80.00% (reference-scaling applicable)
Regulatory settings: HC
CVswitch           : 30.00%
CVcap              : 57.38%
Regulatory constant: 0.760
Nominal α          : 0.0500 (TIE 0.0440)
Point estimate     : 124.00%
Acceptance range   :  66.67 – 150.00% (expanded = 'ABEL')
90.00% CI          : 104.22 – 147.53%
Assessment:
  Confidence interval entirely within acceptance range.
  Point estimate within 80.00 – 125.00%.
  Passed both criteria (ABEL shown).

No way for the EMA, of course.

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

Complete thread:

UA Flag
Activity
 Admin contact
22,986 posts in 4,823 threads, 1,660 registered users;
58 visitors (0 registered, 58 guests [including 2 identified bots]).
Forum time: 08:00 CEST (Europe/Vienna)

Art is “I”; science is “we”.    Claude Bernard

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