Hello,
I have read several materials including the edgeR and GLM manual. I am wondering whether I need to add intercept into the mode.
I am reading the edgeRUserGuid maual..for example, suppose we have such data composing from 12 samples..
> targets
Sample Treat Time
1 Sample1 Placebo 0h
2 Sample2 Placebo 0h
3 Sample3 Placebo 1h
4 Sample4 Placebo 1h
5 Sample5 Placebo 2h
6 Sample6 Placebo 2h
7 Sample1 Drug 0h
8 Sample2 Drug 0h
9 Sample3 Drug 1h
10 Sample4 Drug 1h
11 Sample5 Drug 2h
12 Sample6 Drug 2h
Two Design matrix looks like this..
> Group <- factor(paste(targets$Treat,targets$Time,sep="."))
> cbind(targets,Group=Group)
> design1 <- model.matrix(~0+Group)
> colnames(design1)
[1] "GroupDrug.0h" "GroupDrug.1h" "GroupDrug.2h" "GroupPlacebo.0h" "GroupPlacebo.1h" "GroupPlacebo.2h"
> fit1 <- glmFit(y, design1)
> design2 <- model.matrix(~Treat + Treat:Time, data=targets)
> colnames(design2)
[1] "(Intercept)" "TreatDrug"
[3] "TreatPlacebo:Time1h" <strong>"TreatDrug:Time1h"</strong>
[5] "TreatPlacebo:Time2h" "TreatDrug:Time2h"
> fit2 <- glmFit(y, design2)
What is the difference for
glmLRT(fit1, coef=2)
VS.
glmLRT(fit2, coef=4)
Are they testing the same thing, which find genes resposive for Drug at time 1h...(compared to time 0).?????????????? If it is same, I think there is no reason for intercept term. If it is not, what is the difference for those tests??
Thank you so much!!.. Yes, I will try to find some extra material.. ;)