I am trying to analyse microarray data from samples with the following characteristics: one of two genotypes, a procedure either carried out or not carried out, and, in the case that the procedure is carried out, the treatment can either be a drug or a negative control.
My design matrix, therefore, has three columns: genotype, procedure, and treatment. What I don't understand is how to construct the design matrix such that contrasts be extracted. Most online guides recommend that the design matrix be transformed into factors, but, since all of my variables have only two values, the two factor columns that come out will necessarily be linearly dependent, which means that the linear fit will come back with a warning saying that not all variables could be modelled. On the other hand, if I leave the design matrix as is—i.e., with three columns of 0/1 variables—how do I create the contrast matrix if there is no subtraction for the
makeContrasts() function that can compare
genotype == 0 with
genotype == 1, for example?