mahmoud-teaima
★    

2017-06-08 19:45
(2475 d 10:17 ago)

Posting: # 17468
Views: 18,824
 

 R code for analysis of data from partial replicate design "2x3x3" BE study [🇷 for BE/BA]

Hello all,
Can any of our R-coding experts advise me with an R code to do data analysis of partial replicate design "2x3x3" BE study according to FDA and EMA guidelines.
Greetings.

Mahmoud Teaima, PhD.
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2017-06-10 03:44
(2474 d 02:18 ago)

@ mahmoud-teaima
Posting: # 17480
Views: 17,413
 

 R code for the EMA’s ABEL

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
mahmoud-teaima
★    

2017-06-11 00:48
(2473 d 05:14 ago)

@ Helmut
Posting: # 17484
Views: 16,669
 

 R code for the EMA’s ABEL

Salam Alikum Hilmut,
Thanks for the code!
Waiting you send it to me through email.
Greetings.

Mahmoud Teaima, PhD.
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2017-06-11 03:24
(2473 d 02:38 ago)

@ mahmoud-teaima
Posting: # 17485
Views: 16,727
 

 R code for the EMA’s ABEL

Salam Mahmoud,

❝ Waiting you send it to me through email.


I’ve sent it already yesterday afternoon to the e-mail address you used in registering to the forum. Please check your inbox.
I just sent it again to the three other addresses I found at your faculty’s website. This e-mail contains more explanations. Since you are working on MacOS I adapted the output: The file is encoded in UTF-8 with line endings CR (ASCII 13). Please report back whether it works (I don’t have a Mac to test it).

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
mahmoud-teaima
★    

2017-06-11 05:01
(2473 d 01:01 ago)

@ Helmut
Posting: # 17486
Views: 16,725
 

 R code for the EMA’s ABEL

Salam Helmut,

❝ I’ve sent it already yesterday afternoon to the e-mail address you used in registering to the forum. Please check your inbox.

❝ I just sent it again to the three other addresses I found at your faculty’s website. This e-mail contains more explanations. Since you are working on MacOS I adapted the output: The file is encoded in UTF-8 with line endings CR (ASCII 13).


I got the mail, thanks.

❝ Please report back whether it works (I don’t have a Mac to test it).


Sure, will check it and report back to you.

Many thanks.

Greetings to all participants in this effort.

Mahmoud Teaima, PhD.
Yura
★    

Belarus,
2017-09-04 23:22
(2387 d 06:40 ago)

@ Helmut
Posting: # 17773
Views: 15,815
 

 R code for the EMA’s ABEL

Dear Helmut
I use combined R and SAS (I use the EMA approach) to calculate the replicative design
Is it possible to get from you the implementation code in R of the above described constructions?
thank you very much for any answer
Best regards!
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2017-09-05 03:55
(2387 d 02:07 ago)

@ Yura
Posting: # 17774
Views: 16,079
 

 R code for the EMA’s ABEL

Hi Yura,

❝ Is it possible to get from you the implementation code in R of the above described constructions?


It’s on GitHub: https://github.com/Helmut01/replicateBE
Installation analogous to PowerTOST. See Detlew’s post.

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
Yura
★    

Belarus,
2017-09-06 00:21
(2386 d 05:41 ago)

@ Helmut
Posting: # 17783
Views: 15,724
 

 R code for the EMA’s ABEL

Thank you
it remains only to run
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2017-09-06 16:24
(2385 d 13:38 ago)

@ Yura
Posting: # 17785
Views: 15,730
 

 R code for the EMA’s ABEL

Hi Yura,

❝ it remains only to run


If you have questions, please post here.

If you think that you discovered a bug, keep it. ;-)
No, seriously: Navigate to https://github.com/Helmut01/replicateBE/issues and click on New issue.

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
Yura
★    

Belarus,
2017-09-08 10:54
(2383 d 19:08 ago)

@ Helmut
Posting: # 17794
Views: 15,666
 

 R code for the EMA’s ABEL

Yes, Captain
Best regards!


Edit: ElMaestro is our capt’n. :pirate: I’m just a deckhand. [Helmut]
sschivu
☆    

India,
2019-04-22 15:50
(1792 d 14:12 ago)

@ Helmut
Posting: # 20205
Views: 7,988
 

 R code for the EMA’s ABEL

Hi Helmut,

Request you to send partial replicate code to my Personal email ID.

Regards,
sschivu


Edit: Full quote removed. Please delete everything from the text of the original poster which is not necessary in understanding your answer; see also this post #5[mittyri]
Helmut
★★★
avatar
Homepage
Vienna, Austria,
2019-04-22 20:46
(1792 d 09:16 ago)

@ sschivu
Posting: # 20208
Views: 8,120
 

 package replicateBE for R

Hi sschivu,

❝ Request you to send partial replicate code to my Personal email ID.


See this post. The current version is 1.0.5.9000 (2017-11-25).
You can also click Clone or download ▼ Download ZIP and then install in R from the local file.
Though we validated the code with reference data sets against SAS and Phoenix/WinNonlin it is still a work in progress. Use in a productive environment is at your own risk.


Edit: Releases on CRAN [Helmut]
2019-06-14 1.0.7/1.0.8
2019-07-22 1.0.9
2019-07-24 1.0.10
2019-08-25 1.0.11
2019-11-11 1.0.12 (carnival release)
2020-01-09 1.0.13
2020-04-08 1.0.14

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
gvk
☆    

India,
2019-05-03 11:15
(1781 d 18:47 ago)

@ Helmut
Posting: # 20269
Views: 7,823
 

 package replicateBE for R

Hi Helmut,

I have developed simple crossover & parallel BE code in r using mittyri post code. But I was stuck with 3 period partial replicate code. Could you please help on this.

Request you to send partial replicate r code like SAS code.

Thanks & Regards,
gvk


Edit: Full quote removed. Please delete everything from the text of the original poster which is not necessary in understanding your answer; see also this post! [Ohlbe]
UA Flag
Activity
 Admin contact
22,940 posts in 4,812 threads, 1,640 registered users;
38 visitors (0 registered, 38 guests [including 9 identified bots]).
Forum time: 05:03 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