Oops. Oops. [Regulatives / Guidelines]

posted by d_labes  – Berlin, Germany, 2011-11-25 14:54 (4909 d 07:20 ago) – Posting: # 7723
Views: 8,663

Dear Helmut!

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. :ponder:

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 :confused:. According to the help page of 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:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,667 registered users;
34 visitors (0 registered, 34 guests [including 5 identified bots]).
Forum time: 23:14 CEST (Europe/Vienna)

Patients may recover in spite of drugs or because of them.    John Gaddum

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5