## 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

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

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:

(maybe someone will find it useful)

Thank you very much in advance!

Regards, VStus

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

### Complete thread:

- Correct input data to re-calculate results of 3x3x3 study using lm() - VStus, 2016-08-24 15:42
- Correct input data to re-calculate results of 3x3x3 study using lm() - yjlee168, 2016-08-25 10:29
- Correct input data to re-calculate results of 3x3x3 study using lm() - VStus, 2016-08-26 23:46
- Correct input data to re-calculate results of 3x3x3 study using lm() - BE-proff, 2016-09-09 09:32
- Correct input data to re-calculate results of 3x3x3 study using lm() - VStus, 2016-09-12 08:41

- Correct input data to re-calculate results of 3x3x3 study using lm() - BE-proff, 2016-09-09 09:32

- Correct input data to re-calculate results of 3x3x3 study using lm() - VStus, 2016-08-26 23:46

- Correct input data to re-calculate results of 3x3x3 study using lm() - yjlee168, 2016-08-25 10:29