I have expression data with two conditions. There are 10 IDs in condition A with two replicates total per ID (same animal). There are 20 IDs in condition B with two replicates per ID. I want to test condition A vs. condition B, while controlling for the repeated measures per ID. There is not a time component that I care about. I try to set up the model.matrix with:
model.matrix(~ condition + ID)
but I get that the matrix is not full rank. Therefore can't use this design matrix later on in deseq2. I don't believe that this should be set up with:
model.matrix(~ condition, block = 'ID') as each ID only received one condition.
Should I be modeling this as condition + condition:ID?
Or do I need to adjust the data so that IDs are nested within condition (as in condition A has IDs 1-10, and condition B has IDs 1-20, but ID==1 in condition A is not the same animal as ID ==1 in condition B).