VStus
★    

Poland,
2016-08-24 17:42
(2772 d 22:45 ago)

Posting: # 16571
Views: 7,101
 

 Correct input data to re-calculate results of 3x3x3 study using lm() [🇷 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
★★★
avatar
Homepage
Kaohsiung, Taiwan,
2016-08-25 12:29
(2772 d 03:58 ago)

@ VStus
Posting: # 16574
Views: 5,916
 

 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
bear v2.9.1:- created by Hsin-ya Lee & Yung-jin Lee
Kaohsiung, Taiwan https://www.pkpd168.com/bear
Download link (updated) -> here
VStus
★    

Poland,
2016-08-27 01:46
(2770 d 14:41 ago)

@ yjlee168
Posting: # 16600
Views: 6,021
 

 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
●    

2016-09-09 11:32
(2757 d 04:55 ago)

@ VStus
Posting: # 16629
Views: 5,658
 

 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
★    

Poland,
2016-09-12 10:41
(2754 d 05:46 ago)

@ BE-proff
Posting: # 16632
Views: 5,538
 

 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
UA Flag
Activity
 Admin contact
22,957 posts in 4,819 threads, 1,638 registered users;
70 visitors (0 registered, 70 guests [including 8 identified bots]).
Forum time: 15:27 CET (Europe/Vienna)

Nothing shows a lack of mathematical education more
than an overly precise calculation.    Carl Friedrich Gauß

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