In limma manual, the example of time course experiment (Section 9.6) the target frame showed 2 replicates of 0hr wt and mutant but why it was not considered in the levels or in design? Can anyone please explain the discrepancy? The example, "we consider here a two-way experiment in which time course profiles are to be compared for two genotypes. Consider the targets frame
FileName Target
File1 wt.0hr
File2 wt.0hr
File3 wt.6hr
File4 wt.24hr
File5 mu.0hr
File6 mu.0hr
File7 mu.6hr
File8 mu.24hr
The targets are RNA samples collected from wild-type and mutant animals at 0, 6 and 24 hour time points. This can be viewed as a factorial experiment but a simpler approach is to use the group-mean parametrization.
> lev <- c("wt.0hr","wt.6hr","wt.24hr","mu.0hr","mu.6hr","mu.24hr")
> f <- factor(targets$Target, levels=lev)
> design <- model.matrix(~0+f)
> colnames(design) <- lev
> fit <- lmFit(eset, design)
Thanks
Just to make sure, the correlation between the duplicates can be modeled with the duplicateCorrelation function, right?
Hypothetically yes, but you need a reason to want to do that sort of thing, and there isn't a compelling reason here. In other words, you use
duplicateCorrelation
when you have a reason to believe that there will be correlations between observations that you want to control for. So if the time course involved taking samples from the same animals at each time (which is apparently not the case for this example), then the repeated measurements from each animal could be correlated.In this case the only duplicates are for the 0 hr WT and MU animals, and unless they were measured twice (why?) there is no expectation that they should be correlated, and
duplicateCorrelation
should return a value very close to zero.Thank you for the explanation