Two‐at‐a‐Time analysis in R [Design Issues]
Thank you Helmut for your quick and detailed response!
I'm glad to hear that pseudo-periods have gone the way of the dodo. I agree with the EMA Biostatistics Working Party that it makes more sense (statistically) to maintain the original codings when leaving out data from irrelevant treatments (not to mention being less prone to human error than recoding). Also, I love their name; I bet the EMA Biostatistics Working Party could form a coalition government with the Slightly Silly Party, the Surprise Party, and the Rent Is Too Damn High Party. But I digress.
I don't have WinNonlin, but I tried analyzing Patterson & Jones' Example 4.5 with the Two‐at‐a‐Time Principle using R 1.1.456. My results were similar to the results you posted above, but not as close as I would have expected. I will post the code & table below. Do you see anything I am doing wrong or any obvious explanation of the differences? I don't know how WinNonlin handles missing values, so I tried a few variations (subjects with complete cases in the full dataset, and subjects with complete cases in each of the 3 incomplete-block subsets), but the differences persisted.
This produced the following table:
I'm glad to hear that pseudo-periods have gone the way of the dodo. I agree with the EMA Biostatistics Working Party that it makes more sense (statistically) to maintain the original codings when leaving out data from irrelevant treatments (not to mention being less prone to human error than recoding). Also, I love their name; I bet the EMA Biostatistics Working Party could form a coalition government with the Slightly Silly Party, the Surprise Party, and the Rent Is Too Damn High Party. But I digress.
I don't have WinNonlin, but I tried analyzing Patterson & Jones' Example 4.5 with the Two‐at‐a‐Time Principle using R 1.1.456. My results were similar to the results you posted above, but not as close as I would have expected. I will post the code & table below. Do you see anything I am doing wrong or any obvious explanation of the differences? I don't know how WinNonlin handles missing values, so I tried a few variations (subjects with complete cases in the full dataset, and subjects with complete cases in each of the 3 incomplete-block subsets), but the differences persisted.
# 3-treatment design from Patterson & Jones (2017)
dta = read.table("exam45.dat", header=T)
dta[dta==99999] = NA
dta$Subj = factor(dta$subject)
dta$Per = factor(dta$period)
dta$Seq = factor(dta$sequence)
dta$Trt = factor(dta$formula)
options(contrasts=c("contr.treatment","contr.poly"), digits=4)
# Data frame to store results
IBD = data.frame(Test = paste(rep(c("T vs. R", "S vs. R", "T vs. S"), each=2),
rep(c(" AUC", "Cmax"), times=3)),
PE = NA, LCI = NA, UCI = NA, CV = NA)
# AUC T vs R
muddle = lm(log(AUC)~Trt+Per+Seq+Subj, data=dta[dta$Trt!="S",])
IBD[1, 2:5] = c(100*exp(coef(muddle)["TrtT"]),
100*exp(confint(muddle,c("TrtT"), level=.9)),
100*sqrt(exp(summary(muddle)$sigma^2)-1))
# Cmax T vs R
muddle = lm(log(CMAX)~Trt+Per+Seq+Subj, data=dta[dta$Trt!="S",])
IBD[2, 2:5] = c(100*exp(coef(muddle)["TrtT"]),
100*exp(confint(muddle,c("TrtT"), level=.9)),
100*sqrt(exp(summary(muddle)$sigma^2)-1))
# AUC S vs R
muddle = lm(log(AUC)~Trt+Per+Seq+Subj, data=dta[dta$Trt!="T",])
IBD[3, 2:5] = c(100*exp(coef(muddle)["TrtS"]),
100*exp(confint(muddle,c("TrtS"), level=.9)),
100*sqrt(exp(summary(muddle)$sigma^2)-1))
# Cmax S vs R
muddle = lm(log(CMAX)~Trt+Per+Seq+Subj, data=dta[dta$Trt!="T",])
IBD[4, 2:5] = c(100*exp(coef(muddle)["TrtS"]),
100*exp(confint(muddle,c("TrtS"), level=.9)),
100*sqrt(exp(summary(muddle)$sigma^2)-1))
# AUC T vs S
muddle = lm(log(AUC)~Trt+Per+Seq+Subj, data=dta[dta$Trt!="R",])
IBD[5, 2:5] = c(100*exp(coef(muddle)["TrtT"]),
100*exp(confint(muddle,c("TrtT"), level=.9)),
100*sqrt(exp(summary(muddle)$sigma^2)-1))
# Cmax T vs S
muddle = lm(log(CMAX)~Trt+Per+Seq+Subj, data=dta[dta$Trt!="R",])
IBD[6, 2:5] = c(100*exp(coef(muddle)["TrtT"]),
100*exp(confint(muddle,c("TrtT"), level=.9)),
100*sqrt(exp(summary(muddle)$sigma^2)-1))
# Print table
print(IBD)
This produced the following table:
Test PE LCI UCI CV
1 T vs. R AUC 116.14 108.98 123.78 20.88
2 T vs. R Cmax 129.82 119.50 141.04 27.87
3 S vs. R AUC 140.73 131.02 151.15 23.50
4 S vs. R Cmax 160.04 144.76 176.94 34.06
5 T vs. S AUC 83.51 78.73 88.58 19.07
6 T vs. S Cmax 82.30 75.96 89.18 26.67
Complete thread:
- Three-way crossover BABE Studies acfalcao 2007-09-16 22:34 [Design Issues]
- Three-way crossover example data set Helmut 2007-09-17 20:47
- Three-way crossover example data set acfalcao 2007-09-17 23:02
- Three-way crossover example data set Helmut 2007-09-18 12:47
- Three-way crossover (WinNonlin) Nirali 2007-09-21 06:49
- Three-way crossover (WinNonlin) Helmut 2007-09-21 13:04
- Three-way crossover (WinNonlin) Nirali 2007-09-25 08:05
- Three-way crossover (WinNonlin) Helmut 2007-09-25 13:15
- Three-way crossover (WinNonlin) Nirali 2007-09-25 08:05
- Three-way crossover (WinNonlin) Helmut 2007-09-21 13:04
- Three-way crossover example data set Irene_I 2018-06-07 11:09
- Three-way crossover example data set Helmut 2018-06-07 13:04
- Three-way crossover example data set Irene_I 2018-06-08 11:09
- Three-way crossover example data set Irene_I 2018-06-12 09:21
- Leave-One-Out (IBD) Helmut 2018-06-12 12:42
- Leave-One-Out (IBD) Irene_I 2018-06-13 05:02
- Impact of pooled variance (bias, CI) Helmut 2018-06-13 15:02
- carry (over?) d_labes 2018-06-13 15:31
- Leave-One-Out (IBD) Irene_I 2018-06-13 05:02
- Leave-One-Out (IBD) Helmut 2018-06-12 12:42
- Three-way crossover example data set Helmut 2018-06-07 13:04
- Three-way crossover (WinNonlin) Nirali 2007-09-21 06:49
- Three-way crossover example data set Helmut 2007-09-18 12:47
- Pseudo-periods ElAlumno 2019-03-14 23:40
- Pseudo-periods Helmut 2019-03-15 00:47
- Two‐at‐a‐Time analysis in RElAlumno 2019-03-22 21:59
- fixed & mixed (dammit!) and a request to SASians Helmut 2019-03-23 01:03
- Pooled vs IBD T-R in SAS from non-SASian mittyri 2019-03-23 23:13
- Pooled vs IBD T-R in SAS from non-SASian Helmut 2019-03-23 23:36
- mixed in R mittyri 2019-03-23 23:50
- mixed in R (EMA B ≠ FDA) Helmut 2019-03-24 01:23
- Pooled vs IBD T-R in SAS from non-SASian mittyri 2019-03-23 23:13
- fixed & mixed (dammit!) and a request to SASians Helmut 2019-03-23 01:03
- Two‐at‐a‐Time analysis in RElAlumno 2019-03-22 21:59
- Pseudo-periods Helmut 2019-03-15 00:47
- Williams design 3-way Brus 2021-06-09 16:48
- Williams design 3-way Helmut 2021-06-09 17:48
- Williams design 3-way Brus 2021-06-10 14:33
- Williams design 3-way Helmut 2021-06-10 15:03
- Williams design 3-way vezz 2021-06-10 17:23
- Williams design 3-way Helmut 2021-06-10 20:14
- Williams design 3-way vezz 2021-06-11 09:11
- Williams design 3-way Brus 2021-06-11 12:19
- Williams design 3-way Relaxation 2021-06-11 12:42
- Period effects in general Helmut 2021-06-11 15:41
- Williams design 3-way vezz 2021-06-11 16:56
- Williams design 3-way vezz 2021-06-11 09:11
- Williams design 3-way Helmut 2021-06-10 20:14
- Williams design 3-way vezz 2021-06-10 17:23
- Williams design 3-way Helmut 2021-06-10 15:03
- Williams design 3-way Brus 2021-06-10 14:33
- Williams design 3-way Helmut 2021-06-09 17:48
- Three-way crossover example data set acfalcao 2007-09-17 23:02
- Three-way crossover example data set Helmut 2007-09-17 20:47