Group effects EMA [Two-Stage / GS Designs]
Hi VStus & ElMaestro!
This is really funny, we had 2 last days discussions with Helmut regarding Group effect during the workshop
Yes, in case of just adding a Group you do not see any changes (Fixed: sequence, period, treatment, group, subject(sequence))
But in case of Period %in% Group the situation is not the same!!
a little code for discussion:
Even PE differs!
What the heck?? Where am I wrong? I need to take some Schützomycin!
PS: I see now, the model with Period:Group is wrong
This is really funny, we had 2 last days discussions with Helmut regarding Group effect during the workshop
Yes, in case of just adding a Group you do not see any changes (Fixed: sequence, period, treatment, group, subject(sequence))
But in case of Period %in% Group the situation is not the same!!
a little code for discussion:
# the original code is from this perfect paper:
# http://link.springer.com/article/10.1208/s12248-014-9661-0
Analyse222BE <- function (data, alpha=0.05, Group = FALSE) {
data$Subj <- factor(data$Subj) # Subject
data$Per <- factor(data$Per) # Period
data$Seq <- factor(data$Seq) # Sequence
data$Trt <- factor(data$Trt) # Treatment
# be explicite
ow <- options()
options(contrasts=c("contr.treatment","contr.poly"))
if(!Group) {
muddle <- lm(log(Var)~Trt+Per+Seq+Subj, data=data)
} else {
muddle <- lm(log(Var)~Trt+Per+Seq+Subj+
Group+Per:Group, data=data)
}
# in the standard contrasts option "contr.treatment"
# the coefficient TrtT is the difference T-R since TrtR is set to zero
lnPE <- coef(muddle)["TrtT"]
lnCI <- confint(muddle,c("TrtT"), level=1-2*alpha)
typeI <- anova(muddle)
names(typeI)[5] <- "Pr(>F)"
# no need for the next
mse <- summary(muddle)$sigma^2
# another possibility:
#mse <- typeI["Residuals","Mean Sq]
#df <- df.residual(muddle)
# back transformation to the original domain
CV <- 100*sqrt(exp(mse)-1)
PE <- exp(lnPE)
CI <- exp(lnCI)
# output
cat(sep,"\n")
options(digits=8)
cat("Type I sum of squares: ")
print(typeI)
cat("\nBack-transformed PE and ",100*(1-2*alpha))
cat("% confidence interval\n")
cat("CV (%) ..................................:",
formatC(CV, format="f", digits=2),"\n")
cat("Point estimate (GMR).(%).................:",
formatC(100*PE, format="f", digits=2),"\n")
cat("Lower confidence limit.(%)...............:",
formatC(100*CI[1], format="f", digits=2) ,"\n")
cat("Upper confidence limit.(%)...............:",
formatC(100*CI[2],format="f", digits=2) ,"\n")
cat(sep,"\n\n")
#reset options
options(ow)
}
data <- read.delim("https://static-content.springer.com/esm/art%3A10.1208%2Fs12248-014-9661-0/MediaObjects/12248_2014_9661_MOESM1_ESM.txt")
Group1 <- subset(data, Subj <= 9)
Group1$Group <- 1
Group2 <- subset(data, Subj > 9)
Group2$Group <- 2
data<-rbind(Group1, Group2)
Analyse222BE(data, alpha=0.05, Group = FALSE)
Analyse222BE(data, alpha=0.05, Group = TRUE)
> Analyse222BE(data, alpha=0.05, Group = FALSE)
_______________________________________________________________________________
_______________________________________________________________________________
Type I sum of squares: Analysis of Variance Table
Response: log(Var)
Df Sum Sq Mean Sq F value Pr(>F)
Trt 1 0.02285 0.0228494 3.57254 0.076998 .
Per 1 0.04535 0.0453497 7.09049 0.017019 *
Seq 1 0.21836 0.2183553 34.14018 2.4964e-05 ***
Subj 16 4.24539 0.2653366 41.48578 5.2285e-10 ***
Residuals 16 0.10233 0.0063958
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Back-transformed PE and 90% confidence interval
CV (%) ..................................: 8.01
Point estimate (GMR).(%).................: 95.09
Lower confidence limit.(%)...............: 90.76
Upper confidence limit.(%)...............: 99.62
_______________________________________________________________________________
> Analyse222BE(data, alpha=0.05, Group = TRUE)
_______________________________________________________________________________
_______________________________________________________________________________
Type I sum of squares: Analysis of Variance Table
Response: log(Var)
Df Sum Sq Mean Sq F value Pr(>F)
Trt 1 0.02285 0.0228494 3.42473 0.084021 .
Per 1 0.04535 0.0453497 6.79711 0.019816 *
Seq 1 0.21836 0.2183553 32.72757 4.0497e-05 ***
Subj 16 4.24539 0.2653366 39.76923 2.1387e-09 ***
Per:Group 1 0.00225 0.0022549 0.33797 0.569635
Residuals 15 0.10008 0.0066719
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Back-transformed PE and 90% confidence interval
CV (%) ..................................: 8.18
Point estimate (GMR).(%).................: 94.92
Lower confidence limit.(%)...............: 90.47
Upper confidence limit.(%)...............: 99.59
_______________________________________________________________________________
Even PE differs!
What the heck?? Where am I wrong? I need to take some Schützomycin!
PS: I see now, the model with Period:Group is wrong
—
Kind regards,
Mittyri
Kind regards,
Mittyri
Complete thread:
- Potvin C in the EU Helmut 2013-04-16 17:40 [Two-Stage / GS Designs]
- Potvin C in the EU ElMaestro 2013-04-17 02:31
- Potvin C in the EU Helmut 2013-04-17 12:23
- 2 Groups model FDA d_labes 2013-04-17 13:10
- 2 Groups model FDA Helmut 2013-04-17 16:37
- Group effects obsolete? d_labes 2013-04-18 09:55
- Group effects FDA/EMA Helmut 2013-04-19 14:34
- Group effects FDA/EMA mittyri 2014-08-21 15:34
- Group effects FDA/EMA ElMaestro 2014-08-21 17:31
- Group effects EMA mittyri 2014-10-01 11:25
- Group effects EMA ElMaestro 2014-10-01 11:31
- Group effects EMA Helmut 2014-10-01 13:24
- Group effects EMA VStus 2016-10-06 22:06
- Group effects EMA ElMaestro 2016-10-07 12:45
- Group effects EMAmittyri 2016-10-07 15:06
- Fixed effects model with Group term mittyri 2016-10-09 13:27
- Fixed effects model: changing the F, p values mittyri 2016-10-10 18:33
- Fixed effects model: changing the F, p values ElMaestro 2016-10-10 20:10
- Fixed effects model: changing the F, p values Helmut 2016-10-11 00:17
- Holy War of type III d_labes 2016-10-11 13:17
- Significance of Group effect in Russia: why the type III is so 'important' mittyri 2016-10-11 15:07
- Fixed effects model: changing the F, p values zizou 2016-10-11 01:06
- FDA group model in R mittyri 2016-10-11 13:43
- FDA group model in R ElMaestro 2016-10-12 01:07
- FDA group model in R VStus 2016-10-17 15:32
- FDA group model in R ElMaestro 2016-10-17 18:58
- FDA group model in R VStus 2016-10-20 13:57
- FDA group model in R ElMaestro 2016-10-17 18:58
- FDA group model in R mittyri 2016-10-11 13:43
- Fixed effects model: changing the F, p values ElMaestro 2016-10-10 20:10
- Fixed effects model with Group term VStus 2016-10-20 13:54
- Fixed effects model: changing the F, p values mittyri 2016-10-10 18:33
- Fixed effects model with Group term mittyri 2016-10-09 13:27
- Group effects EMAmittyri 2016-10-07 15:06
- Group effects EMA ElMaestro 2016-10-07 12:45
- Group effects EMA VStus 2016-10-06 22:06
- Group effects FDA/EMA zizou 2016-12-31 02:54
- Group effects FDA/EMA Helmut 2017-06-03 14:57
- Group effects EMA mittyri 2014-10-01 11:25
- Group effects FDA/EMA ElMaestro 2014-08-21 17:31
- Group effects FDA/EMA mittyri 2014-08-21 15:34
- Group effects FDA/EMA Helmut 2013-04-19 14:34
- 2 Groups model FDA hiren379 2013-08-22 14:32
- Homework Helmut 2013-08-23 11:53
- Group effects obsolete? d_labes 2013-04-18 09:55
- 2 Groups model FDA Helmut 2013-04-17 16:37
- 2 Groups model FDA d_labes 2013-04-17 13:10
- Potvin C in the EU Helmut 2013-04-17 12:23
- Potvin C in the EU ElMaestro 2013-04-17 02:31