fixed & mixed (dammit!) and a request to SASians [Design Issues]
❝ I agree with the EMA Biostatistics Working Party […]. 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.
It is really existing though David Brown will be brexited (is this already a word?) unceremoniously.
❝ But I digress.
That’s fine. Adds some spice to that dry stuff.
❝ […] I tried analyzing Patterson & Jones' Example 4.5 with the Two‐at‐a‐Time Principle using R 1.1.456.
What? 1.1.456? 1.1.4 was the first one I used in 2002. Current is 3.5.3!
❝ 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,…
That’s not the point. The devil is in the details. I wrote above:
❝ ❝ ❝ ❝ Phoenix/WinNonlin 8, mixed effects
Why? Well, Patterson & Jones analyzed the data with SAS
Proc MIXED
and I wanted to reproduce it in PHX/WNL (restricted maximum likelihood). OK, they used in SAS ddfm=KENWARDROGER
1 and yours truly Satterthwaite’s df.When I switched in PHX/WNL to a fixed effects model (i.e., like
lm()
in R and SAS Proc GLM
) I got exactly your results. Hence, your code is fine though you can streamline it (specify NAs and classes):dta <- read.table("exam45.dat", header=TRUE, na.strings="99999",
colClasses=c(rep("factor", 4), rep("numeric", 2)))
sum(is.na(dta$AUC))
[1] 6
sum(is.na(dta$CMAX))
[1] 2
str(dta)
'data.frame': 186 obs. of 6 variables:
$ subject : Factor w/ 62 levels "001","002","004",..: […]
$ sequence: Factor w/ 6 levels "1","2","3","4",..: […]
$ period : Factor w/ 3 levels "1","2","3": […]
$ formula : Factor w/ 3 levels "R","S","T": […]
$ AUC : num 4089 7411 5513 2077 3684 ...
$ CMAX : num 906 1711 1510 504 845 ...
I would not use
option(..., digits=4)
cause IMHO, this may affect also the precision of internal calculations. Better to round yourself at the end, f.i.IBD[1, 2:5] <- round(c(foo, bar, baz), 2)
.
So what do we have (T/R of AUC)?
$$\small{\begin{array}{llccc}\hline
\text{Method} & \text{Setup} & \text{PE} & \text{90% CI} & \text{CV (%)} \\
\hline
\text{pooled} & \text{SAS Proc MIXED (KENWARDROGER)} & \text{116.2 } & \text{109.0 , 123.9 } & \text{21.3}^2 \\
& \text{SAS Proc MIXED (SATTERTHWAITE)} & 116.15 & \text{108.97, 123.81} & 21.20 \\
& \text{PHX/WNL REML (Satterthwaite)} & 116.15 & \text{108.97, 123.81} & 21.20 \\
& \text{R lmer() Satterthwaite} & 116.15 & \text{108.97, 123.81} & 21.20 \\
& \text{R lmer() Kenward-Roger} & 116.15 & \text{108.97, 123.81} & 21.20 \\\hline
& \text{PHX/WNL LM (all fixed)} & 116.24 & \text{109.04, 123.92} & 21.22 \\
& \text{R lm()} & 116.24 & \text{109.04, 123.92} & 21.22 \\
\hline
\text{IBD} & \text{SAS Proc MIXED (SATTERTHWAITE)} & 116.05 & \text{108.92, 123.65} & 20.84 \\
& \text{PHX/WNL REML (Satterthwaite)} & 116.05 & \text{108.92, 123.65} & 20.84 \\\hline
& \text{R lmer() Satterthwaite} & 116.05 & \text{108.97, 123.58} & 20.84 \\
& \text{R lmer() Kenward-Roger} & 116.05 & \text{108.97, 123.58} & 20.84 \\\hline
& \text{PHX/WNL LM (all fixed)} & 116.14 & \text{108.98, 123.78} & 20.88 \\
& \text{R lm()} & 116.14 & \text{108.98, 123.78} & 20.88 \\
\hline
\end{array}}$$If Satterthwaite’s df are used, the mixed effects model in SAS and PHX/WNL agree. R lm() agrees with PHX/WNL’s fixed effects model. A little bit surprising to me that Proc MIXED with ddfm=KENWARDROGER3 gives the same result as a fixed effects model. OK, but the FDA recommends Satterthwaite’s df for ages.4 A mixed effects model may give a lower residual variance – like in this case – because information of incomplete data is recovered. R lmer() is set up according to the EMA’s ‘Method B’ which treats subject as a random effect but is not a true mixed effects model. Given only for completeness (for the code see below).
Mixed effects in R are a swamp. The closest I could get was this:
library(nlme)
muddle1 <- lme(log(AUC) ~ Trt + Per + Seq, data = dta[dta$Trt != "S", ],
random = ~Trt-1|Subj, weights = varIdent(form = ~1|Trt),
method = "REML", na.action = na.exclude,
control = lmeControl(opt = "optim", msMaxIter = 200))
anova(muddle1, type="marginal")
summary(muddle1)
Extracting the required stuff is beyond me. We had many discussions already in the forum and the verdict was “mixed effects models for BE are not possible in R”.
So if you are happy with a fixed effect model (many jurisdictions like the EMA), fine. If you have to deal with the FDA or Health Canada, maybe not.
- Jones B, Kenward MG. Design and Analysis of Cross-Over Trials. Boca Raton: CRC Press; 3rd ed. 2015.
- Limited precision of results in the log-domain of the reference, CV not given. Estimated:
library(PowerTOST)
round(100*CVfromCI(lower = 1.09, upper = 1.239, design = "3x6x3",
n = c(8, 11, 11, 10, 10, 10)), 1)
- SAS tells me: This method changes output in the following tables: Contrast, CorrB, CovB, Diffs, Estimates, InvCovB, LSMeans, Slices, SolutionF, SolutionR, Tests1–Tests3. The OUTP= and OUTPM= data sets are also affected.
- FDA/CDER. Guidance for Industry. Statistical Approaches to Establishing Bioequivalence. January 2001. download.
Dif-tor heh smusma 🖖🏼 Довге життя Україна!
Helmut Schütz
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes
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 R ElAlumno 2019-03-22 21:59
- fixed & mixed (dammit!) and a request to SASiansHelmut 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 SASiansHelmut 2019-03-23 01:03
- Two‐at‐a‐Time analysis in R ElAlumno 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