[BioC] Limma time course analysis - defining comparisons
James W. MacDonald
jmacdon at med.umich.edu
Wed Jun 11 15:26:02 CEST 2008
Hi Helen,
Helen Zhou wrote:
> Dear Sir/Madam
>
> I am trying to analyse a short time series, roughly
> following section 8.8 in the limma user guide. I am
> interested in differences between all time points. I
> am not sure whether I have to make all the pariwise
> comparisons directly, or whether they can be done
> indirectly as well.
>
> For example, if I want to compare to time points, what
> is the differences between the two methods listed
> below.
>
> library(bronchialIL13)
> # Just for the IL13 samples
> data <- HAHrma[,7:15]
> # Design
> targets <-
> c("h12","h12","h12","h24","h24","h24","h4","h4","h4")
> lev <- c("h12","h24","h4")
> f <- factor(targets, levels=lev)
> design <- model.matrix(~0+f)
> colnames(design) <- lev
> fit <- lmFit(data, design)
> # 2-step contrasts, used to indirectly get 24 to 4
> hours as well as the other two comparisons
> contrasts <- makeContrasts("h24-h12", "h12-h4",
> levels=design)
> fit2 <- contrasts.fit(fit, contrasts)
> fit2 <- eBayes(fit2)
> # Direct contrast of 24 to 4 hours
> contrasts2 <- makeContrasts("h24-h4", levels=design)
> fit3 <- contrasts.fit(fit, contrasts2)
> fit3 <- eBayes(fit3)
> # Comparison
> topTable(fit2, coef=1:2)
> topTable(fit3, coef=1)
In the first case you are asking the question 'which reporters are
different in either h24 vs h4 _or_ h12 vs h4', whereas in the second
case you are asking 'which reporters are different between H24 and h4'.
It is entirely possible that you could have a gene that isn't different
between h24 and h4, but is different at h12. This would show up in the
first comparison but not the second, so if you want to compare time
points you are better off making direct contrasts rather than using the
F-statistic for multiple contrasts (which will then require the
additional step of figuring out which contrast(s) caused the statistic
to be significant).
Best,
Jim
>
> More or less the same probe sets are present, but in
> different order and with different p values. Is the
> difference because using coef=1:2 will go via an
> F-test? And if I want the change from 24h-0h as well
> as 42-12h and 12-4h, is it most correct for me to
> specify that contrast directly? In my actual
> experiment I have 4 time points, so will it be enough
> for me with 3 possible comparisons, or will I have to
> write all the 6 possible combinations?
>
> Thank you in advance for all your help.
>
> Yours truly
> Mrs Helen Zhou
>
> P.S. I think this might have been mentioned on the
> list before, but I could not find the email. In that
> case, please excuse me for repeating this.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623
More information about the Bioconductor
mailing list