Bioequivalence and Bioavailability Forum

Main page Policy/Terms of Use Abbreviations Latest Posts

 Log-in |  Register |  Search

Back to the forum  Query: 2017-06-27 10:50 CEST (UTC+2h)
 
VStus
Regular

Poland,
2016-08-24 15:42

Posting: # 16571
Views: 2,233
 

 Correct input data to re-calculate results of 3x3x3 study using lm() [R for BE/BA]

Hi to Everyone!
Glad to join your community!

I'm using bear and PowerTOST for period of about 1 year in our Company for re-analysis of studies performed and planning of new BE studies. I want to thank authors as well as community contributed to development of these programs!

Recently, I've faced a limitation in bear's functionality in regards to statistical analysis of Latin squares studies (3x3x3 and 4x4x4: pilot, development studies). I was asked to analyze C24; Cmax and AUC0t were used as internal validation versus results provided by CRO (SAS PROC GLM).

After some research, I've used parts of bear's code, as well as code published by Helmut Schütz, Detlew Labes, and Anders Fuglsang (doi: 10.1208/s12248-014-9661-0) to process and obtain CV%, PE & 90%CI of the 'balanced' dataset in R (under balanced for latin squares study I mean all subjects completed all sequences and were analyzed, e.g. 18 completed subjects out of 18 planned in 3x3x3 study).

My confusion started when I realized that if I want to reproduce analysis results provided by different CROs, I must run lm() on different sets of data: either complete set (all treatments, same CV% for each PK parameter for all treatments) or reduced dataset (purging unnecessary treatments: excluding results for Test-2 if I'm comparing Test-1 versus Reference, this way I receive different CV% for different pairs of treatments compared).

It seems that second approach is EMEA-compliant ("... In studies with more than two treatment arms (e.g. a three period study including two references, one from EU and another from USA, or a four period study including test and reference in fed and fasted states), the analysis for each comparison should be conducted excluding the data from the treatments that are not relevant for the comparison in question."). It was discussed some time ago, but was there a clear clarification from EMEA since then?Old discussion here

Data was formatted in similarly to 'bear-friendly' CSV format (I kept original treatment and sequence code) and the code used is quite simple:
data = read.csv("StudyN_3x3.csv", header = TRUE,row.names=NULL, col.names=c("subj","drug","seq", "prd","C24", "Cmax", "AUC0t"),sep = ";", dec = ",")
# Correct filename should be printed prior to execution of the command in R
# Default R working directory is /My Documents
print(data, row.names=FALSE)
TotalData<-data.frame(subj=as.factor(data$subj),drug=as.factor(data$drug),seq=as.factor(data$seq), prd=as.factor(data$prd),C24=data$C24,Cmax=data$Cmax,AUC0t=data$AUC0t)
alpha <- 0.05
cat("Analyzing Cmax for Test1 versus Reference......:","\n")
cat("GLM Type I error table..........................:","\n")
aovCmax <- lm(log(Cmax) ~ seq + subj:seq + prd + drug, data=TotalData, na.action=na.exclude)
anova(aovCmax)
MSE <- anova(aovCmax)[5,3] MSE
PE <- coef(aovCmax)["drugT1"] CI <- confint(aovCmax,c("drugT1"), level=1-2*alpha)
Sys.time()
cat("Cmax CV (%) .................................:", formatC(100*sqrt(exp(MSE)-1), format="f", digits=3),"\n")
cat("Cmax Point estimate (PE).(%).................:", formatC(100*exp(PE), format="f", digits=3),"\n")
cat("Cmax Lower confidence limit.(%)..............:", formatC(100*exp(CI[1]), format="f", digits=3),"\n")
cat("Cmax Upper confidence limit.(%)..............:", formatC(100*exp(CI[2]), format="f", digits=3),"\n")


(maybe someone will find it useful)

Thank you very much in advance!
Regards, VStus
yjlee168
Senior
Homepage
Kaohsiung, Taiwan,
2016-08-25 10:29

@ VStus
Posting: # 16574
Views: 1,832
 

 Correct input data to re-calculate results of 3x3x3 study using lm()

Dear VStus,

Thanks for sharing your approach here. This looks great. So how were the results obtained from running your R codes compared with that from SAS PROC GLM by CRO?

» Recently, I've faced a limitation in bear's functionality in regards to statistical analysis of Latin squares studies (3x3x3 and 4x4x4: pilot, development studies). I was asked to analyze C24; Cmax and AUC0t were used as internal validation versus results provided by CRO (SAS PROC GLM).

All the best,
---Yung-jin Lee
[image]bear v2.8.3:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan http://pkpd.kmu.edu.tw/bear
Download link (updated) -> here
VStus
Regular

Poland,
2016-08-26 23:46

@ yjlee168
Posting: # 16600
Views: 1,787
 

 Correct input data to re-calculate results of 3x3x3 study using lm()

Dear Yung-jin Lee,

» So how were the results obtained from running your R codes compared with that from SAS PROC GLM by CRO?

My parameters of interest were: Residuals Mean Squares (MSE), Point Estimate and 90% Confidence Interval. I was able to confirm that these parameters perfectly match with SAS reported values, as well as 'F Values' and 'Pr > F' for prd, drug and seq:subj, but not for seq.

I have regrouped my drug factor to avoid calculation of PE and 90%CI for R/T instead of T/R in some cases:
cat("Available treatments:…")
TotalData$drug["Levels"] ref.drug <- readline(prompt="Enter Reference Treatment Code:  ") #WARNING! No input check!
TotalData$drug <- relevel(TotalData$drug, ref = ref.drug)

By the way, bear's lm.mod() was not confused by having more than 2 periods and 2 sequences, but I've still removed observations for other treatments (T2,T3) from datasets to compare just pair of them. But data was balanced (same number of observations for all sequences).
lm.mod(log(TotalData$C24), TotalData)

Study1:
+----+------------+
|    | P1  P2  P3 |
+----+------------+
| S1 | R   T1  T2 |
| S2 | T1  T2  R  |
| S3 | T2  R   T1 |
+----+------------+
Study2:
+----+----------------+
|    | P1  P2  P3  P4 |
+----+----------------+
| S1 | R   T1  T2  T3 |
| S2 | T1  T2  T3  R  |
| S3 | T2  T3  R   T1 |
| S4 | T3  R   T1  T2 |
+----+----------------+


Best regards,
VStus
BE-proff
Senior

Russia,
2016-09-09 09:32

@ VStus
Posting: # 16629
Views: 1,619
 

 Correct input data to re-calculate results of 3x3x3 study using lm()

Hi VStus,

As far as I understood you had studies with several dosages test products and the same reference.
Correct? ;-)
VStus
Regular

Poland,
2016-09-12 08:41

@ BE-proff
Posting: # 16632
Views: 1,482
 

 Correct input data to re-calculate results of 3x3x3 study using lm()

Dear BE-proff,

» As far as I understood you had studies with several dosages test products and the same reference. Correct? ;-)

Both studies were exploratory pilots to comparative bioavailability of different Test formulations having different in-vitro characteristics (modified release products) versus Reference formulation. Bioequivalence assessment was only supportive.

Test product was developed using different release mechanism than originator, in-vivo performance of different formulation tweaks were assessed based on obtained PK profiles versus in-vitro data.

Regards, VStus
Back to the forum Activity
 Thread view
Bioequivalence and Bioavailability Forum | Admin contact
17,007 Posts in 3,644 Threads, 1,043 registered users;
15 users online (0 registered, 15 guests).

We absolutely must leave room for doubt
or there is no progress and no learning.
There is no learning without having to pose a question.
And a question requires doubt.
People search for certainty.
But there is no certainty.    Richard Feynman

The BIOEQUIVALENCE / BIOAVAILABILITY FORUM is hosted by
BEBAC Ing. Helmut Schütz
XHTML/CSS RSS Feed