Oops. Oops. [Regulatives / Guidelines]
Quite a time ago I had promised to come out with a simulation including subject variability and intra-subject correlation.
Due to spare time I could not until now consider this.
Before posting my results I would like to compare it to your code.
Inspecting it I have some doubts:
❝ # massacrating out everything related to R2
❝ # means that when T was before R1 we now have a seq 1 otherwise a seq 2
❝ seq2 <- as.factor(rep(c(1,1, 2,2, 1,1, 1,1, 2,2, 2,2), size/6))
❝ sub2 <- as.factor(rep(1:size, each = 2))
❝ per2 <- as.factor(rep(1:2, size))
❝ trt2 <- as.factor(rep(c(1,2, 2,1, 1,2, 1,2, 2,1, 2,1), size/6))
Must the EMA guidance interpreted in this way, i.e. analysing the dataset with 'pseudo' periods and sequences? Or should it interpreted the way which is employed in the Q&A for the replicate design (intra-subject variability of the reference). That means only massacre out the data concerning R2 but retaining the original periods and sequences.

❝ FullModel <- lm(log(y1) ~ 0 + seq1 + sub1 %in% seq1 + per1 + trt1)
❝ FMDelta <- mean(log(y1)[trt1==1])-mean(log(y1)[trt1==2])
❝ FMdf <- aov(FullModel)$df.residual
❝ FMMSE <- summary(FullModel)$sigma^2/FMdf
❝ FMlo <- 100*exp(FMDelta - qt(1-0.05,FMdf)*sqrt(2*FMMSE/size))
❝ FMhi <- 100*exp(FMDelta + qt(1-0.05,FMdf)*sqrt(2*FMMSE/size))
❝ FMCI <- FMhi - FMlo
❝ FMCVintra <- c(FMCVintra, sqrt(exp(FMMSE)-1))
At least the code for FMMSE has stolen my sleep

lm.summary()
"... sigma - the square root of the estimated variance of the random error" and IMHO then the MSE is sigma^2 without the division by the degrees of freedom!Check this out via
anova(FullModel)["Residuals","Mean Sq"]==summary(FullModel)$sigma^2
.Or did I miss sumfink here?
Regards,
Detlew
Complete thread:
- Anticonservativism?! ElMaestro 2010-02-06 17:10 [Regulatives / Guidelines]
- Conservativism? Helmut 2011-11-03 21:12
- In hindsight... ElMaestro 2011-11-03 21:43
- In hindsight... Helmut 2011-11-04 01:56
- In hindsight... ElMaestro 2011-11-04 08:41
- rlnorm simulates what? d_labes 2011-11-04 09:40
- Oops. Helmut 2011-11-04 16:05
- Oops. ElMaestro 2011-11-04 16:22
- Simulation of intra-subject variability d_labes 2011-11-07 11:16
- Simulation of intra-subject variability ElMaestro 2011-11-08 11:02
- Simulation of intra-subject variability d_labes 2011-11-07 11:16
- Oops. Oops.d_labes 2011-11-25 13:54
- Another Oops. Helmut 2011-11-25 14:23
- Oops. ElMaestro 2011-11-04 16:22
- Oops. Helmut 2011-11-04 16:05
- In hindsight... Helmut 2011-11-04 01:56
- In hindsight... ElMaestro 2011-11-03 21:43
- Simul Ants questions d_labes 2011-11-04 15:46
- Simul Ants questions ElMaestro 2011-11-04 16:06
- Simul Ants questions Helmut 2011-11-04 16:09
- Liberal Conservatives d_labes 2011-11-08 11:31
- Liberal Conservatives martin 2011-11-08 20:50
- Liberal Conservatives Helmut 2011-11-08 22:56
- intra-subject correlation martin 2011-11-09 09:01
- intra-subject correlation Helmut 2011-11-25 17:16
- intra-subject correlation martin 2011-11-09 09:01
- Liberal Conservatives Helmut 2011-11-08 22:56
- Liberal Conservatives martin 2011-11-08 20:50
- Conservativism? Helmut 2011-11-03 21:12