R code for the EMA’s ABEL [🇷 for BE/BA]

posted by Helmut Homepage – Vienna, Austria, 2017-06-10 03:44 (2474 d 08:08 ago) – Posting: # 17480
Views: 17,420

Hi Mahmoud,

❝ […] an R code to do data analysis of partial replicate design "2x3x3" BE study according to FDA and EMA guidelines.


Good news: The EMA’s ‘Method A’ and ‘Method B’ are fairly easy to implement in R. I have code covering the following designs: RTRT|TRTR, RTTR|TRRT, RTR|TRT, RTT|TRR, RRT|RTR|TRR. The code handles balanced/unbalanced sequences and complete/incomplete data (i.e., periods missing). Example output:

This code is copyright © by Helmut Schütz, Michael Tomashevskiy, Detlew Labes.
This code is open source; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software Foun-
dation; either version 3, or (at your option) any later version. See the GNU
GPL for more details. Copies of the GPL-3 versions are available at:
http://www.gnu.org/licenses/gpl-3.0.html
╔════════════════════════════════════════════════════════════════════════════╗
║ Program offered for Use without any Guarantees and Absolutely No Warranty. ║
║ No Liability is accepted for any Loss and Risk to Public Health Resulting  ║
║ from Use of this R-Code.                                                   ║
╚════════════════════════════════════════════════════════════════════════════╝
Directory          : E:/Public/Documents/BEBAC/Publications/AAPS J/RepVal/Data/
File [sheet]       : DS.xls [01]
System             : BEBAC-PC
User               : HS
Operating System   : Windows 7 x64 build 7601, Service Pack 1
R version          : 3.4.0   (2017-04-21)
readxl version     : 1.0.0   (2017)
PowerTOST version  : 1.4.5   (2017)
EMA_methodAB vers. : 0.95    (2017-06-11)
──────────────────────────────────────────────────────────────────────
Function           : CV.calc(); exec. 2017-06-11 18:10:33 CEST
  Fixed effects    : sequence + subject(sequence) + period
  Data             : treatment = R
Function           : method.A(); exec. 2017-06-11 18:10:33 CEST
  Fixed effects    : sequence + subject(sequence) + period + treatment
  Data             : all
──────────────────────────────────────────────────────────────────────
Data set I given by the EMA (Q&A document) available at
http://www.ema.europa.eu/docs/en_GB/document_library/Scientific_guideline/2009/09/WC500002963.pdf
Analysis performed on column ‘PK’ (data internally log-transformed)
Sequences (design) : RTRT|TRTR (4-period full replicate)
Subjects / sequence: 38|39   (unbalanced)
Missings / sequence: 3|7     (incomplete)
Missings / period  : 0|1|7|2 (incomplete)
Subjects (total)   :  77
Sub’s with T and R :  77 (calculation of the CI)
Sub’s with two Ts  :  71
Sub’s with two Rs  :  73
Degrees of freedom : 217
alpha              : 0.05 (90% CI)
Switching CV       :  30.00%
Scaling cap        :  50.00%
Regulatory constant: 0.760
GMR restriction    :  80.00% ... 125.00%
CVwT               :  35.16%
CVwR               :  46.96% (reference-scaling applicable)
Expanded limits    :  71.23% ... 140.40%
Recalculation due to presence of 2 outliers (subj. 45|52)
─────────────────────────────────────────────────────────
CVwR (outl. excl.) :  32.16% (reference-scaling applicable)
Expanded limits    :  78.79% ... 126.93%

Assessment based on original CVwR 46.96%
────────────────────────────────────────
Confidence interval: 107.11% ... 124.89% (pass)
Point estimate     : 115.66% (pass)
Overall conclusion : pass

Assessment based on recalculated CVwR 32.16%
────────────────────────────────────────────
Confidence interval: pass
Point estimate     : pass
Overall conclusion : pass


This code is copyright © by Helmut Schütz, Michael Tomashevskiy, Detlew Labes.
This code is open source; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software Foun-
dation; either version 3, or (at your option) any later version. See the GNU
GPL for more details. Copies of the GPL-3 versions are available at:
http://www.gnu.org/licenses/gpl-3.0.html
╔════════════════════════════════════════════════════════════════════════════╗
║ Program offered for Use without any Guarantees and Absolutely No Warranty. ║
║ No Liability is accepted for any Loss and Risk to Public Health Resulting  ║
║ from Use of this R-Code.                                                   ║
╚════════════════════════════════════════════════════════════════════════════╝
Directory          : E:/Public/Documents/BEBAC/Publications/AAPS J/RepVal/Data/
File [sheet]       : DS.xls [01]
System             : BEBAC-PC
User               : HS
Operating System   : Windows 7 x64 build 7601, Service Pack 1
R version          : 3.4.0   (2017-04-21)
readxl version     : 1.0.0   (2017)
PowerTOST version  : 1.4.5   (2017)
nlme version       : 3.1.131 (2017)
EMA_methodAB vers. : 0.95    (2017-06-11)
─────────────────────────────────────────────────────────────────────────────────
Function           : CV.calc(); exec. 2017-06-11 18:10:37 CEST
  Fixed effects    : sequence + subject(sequence) + period
  Data             : treatment = R
Function           : method.B(option=2): nlme/lme; exec. 2017-06-11 18:10:37 CEST
  Fixed effects    : sequence + period + treatment
  Random effect    : subject(sequence)
  Data             : all
─────────────────────────────────────────────────────────────────────────────────
Data set I given by the EMA (Q&A document) available at
http://www.ema.europa.eu/docs/en_GB/document_library/Scientific_guideline/2009/09/WC500002963.pdf
Analysis performed on column ‘PK’ (data internally log-transformed)
Sequences (design) : RTRT|TRTR (4-period full replicate)
Subjects / sequence: 38|39   (unbalanced)
Missings / sequence: 3|7     (incomplete)
Missings / period  : 0|1|7|2 (incomplete)
Subjects (total)   :  77
Sub’s with T and R :  77 (calculation of the CI)
Sub’s with two Ts  :  71
Sub’s with two Rs  :  73
Degrees of freedom : 217
alpha              : 0.05 (90% CI)
Switching CV       :  30.00%
Scaling cap        :  50.00%
Regulatory constant: 0.760
GMR restriction    :  80.00% ... 125.00%
CVwT               :  35.16%
CVwR               :  46.96% (reference-scaling applicable)
Expanded limits    :  71.23% ... 140.40%
Recalculation due to presence of 2 outliers (subj. 45|52)
─────────────────────────────────────────────────────────
CVwR (outl. excl.) :  32.16% (reference-scaling applicable)
Expanded limits    :  78.79% ... 126.93%

Assessment based on original CVwR 46.96%
────────────────────────────────────────
Confidence interval: 107.17% ... 124.97% (pass)
Point estimate     : 115.73% (pass)
Overall conclusion : pass

Assessment based on recalculated CVwR 32.16%
────────────────────────────────────────────
Confidence interval: pass
Point estimate     : pass
Overall conclusion : pass


I will send you the code by PM.

Bad news: Evaluation of replicate designs which will give exactly the same results as SAS’ PROC MIXED according to the FDA’s progesterone guidance is not (and likely will never be) possible in R. Too different philosophies.


Edit: Updated the output according to v0.95 of the R-code.

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,940 posts in 4,812 threads, 1,640 registered users;
55 visitors (0 registered, 55 guests [including 16 identified bots]).
Forum time: 10:53 CET (Europe/Vienna)

Those people who think they know everything
are a great annoyance to those of us who do.    Isaac Asimov

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