I am trying to wrap my head around how the model matrix works and how to use it to analyze data.
I have a model analyzing rna seq data where I have 2 genotypes I want to compare in different conditions and overall. The samples are either KO or WT genotypes. I have 2 treatments treated and untreated. And I have two time points 1h and 24h.
If i put up the model matrix:~ genotype + time +treatment. And get the following model: intercept, genotypeKO, time24h, treatmenttreated. Then If I understand how it works: the intercept is the gene expression as WT, time1h and untreated. And for example comparing genotypeKO to the intercept would give me the difference of the genotype and removing time and treatment as confounders. (Or am I totally wrong?)
But then if I would like to compare the genotype with the other variables, like for example: How is the genotype effect only at 24 hours, or how is the genotype effect at 24hours and untreated. How would I design that matrix and contrast?
Someone who can help me with this and maybe help me shed some light on how this works?