In the limma vignette page 44, a simple 2 factorial example is given. My case follows something similar, where I have treatment and time.
TS <- paste(targets$Strain, targets$Treatment, sep=".") TS <- factor(TS, levels=c("WT.U","WT.S","Mu.U","Mu.S")) design <- model.matrix(~0+TS) colnames(design) <- levels(TS)
The resulting design contains all possible columns.
In my case, I'm trying to do the same, but specifying different columns (
treatment), and then specifying
design = model.matrix(~0 + strain + treatment, data=targets), but this results in 1 less column in
strain and in
treatment. I already know that a workaround is to merge everything as shown above and in the vignette, but why can't I do it in the same way when I specify
Note that I have assigned the intercept as
0 just like in the design above.