I am confused by something in the edgeR user guide in section 3.3.1. The worked example indicates that each sample is obtained from independent subjects but the Sample name in the sample column seems to indicate that the Drug and Placebo samples are paired (i.e. Sample1, Sample2, etc.).
Is this example for a paired or an unpaired design?
Here is the Experimental Design file.
> targets Sample Treat Time Sample1 Placebo 0h Sample2 Placebo 0h Sample3 Placebo 1h Sample4 Placebo 1h Sample5 Placebo 2h Sample6 Placebo 2h Sample1 Drug 0h Sample2 Drug 0h Sample3 Drug 1h Sample4 Drug 1h Sample5 Drug 2h Sample6 Drug 2h
If this was originally for an unpaired design and I wanted to convert this to a paired one where the pairing was based upon the labels Sample#, would the correct design be the following?
Group<-factor(paste(targets$Treat,targets$Time,sep=".")) Patient<-factor(paste(targets$Sample)) design<-model.matrix(~0+Group+Patient)
For Reference, the original code used to generate the design matrix in the user guide was as follows.
Group<-factor(paste(targets$Treat,targets$Time,sep="."))
design<-model.matrix(~0+Group)
Thanks for the info. I will look into it.