Hi,
I am attempting to create a design matrix in edgeR to determine differentially expressed genes, but I am unsure on the notation to use as I am relatively new to R and not a statistician in any way.
Basically, the experimental design is as follows:
We have two treatments (A and B), each treatment had two cages and in each cage, there were 3 mice. Therefore in total, we have 6 mice for each treatment, coming from 2 cages for each treatment (total of 4 cages). We are not interested in the effect of the different cages, but are interested in differentially expressed genes between the 2 treatments (A and B).
So what I was wondering is what the design matrix would be taking into account that cage is nested in treatment. Would it be one of the following or something completely different:
Thanks for any help
I am attempting to create a design matrix in edgeR to determine differentially expressed genes, but I am unsure on the notation to use as I am relatively new to R and not a statistician in any way.
Basically, the experimental design is as follows:
We have two treatments (A and B), each treatment had two cages and in each cage, there were 3 mice. Therefore in total, we have 6 mice for each treatment, coming from 2 cages for each treatment (total of 4 cages). We are not interested in the effect of the different cages, but are interested in differentially expressed genes between the 2 treatments (A and B).
So what I was wondering is what the design matrix would be taking into account that cage is nested in treatment. Would it be one of the following or something completely different:
PHP Code:
design <- model.matrix(~cage/treatment)
design <- model.matrix(~treatment*cage)
design <- model.matrix(~cage %in% treatment)