Is there any simple way to extract the degrees of freedom from a DESeqDataSet
object that's been through the complete DESeq
pipeline?
At first I thought perhaps the empirical Bayes shrinkage augmented the df as it does in limma
, but that doesn't appear to be the case judging by the Love et al., 2014 paper. (Still not 100% certain about this.) Then I thought I could just subtract the number of coefficients from the number of samples as you would for any regular regression, but I'm a little confused by the talk of expanded model matrices in the documentation for nbinomWaldTest
. It sounds like the default behaviour of the function is to compute coefficients for each level of each factor, in addition to a model intercept. Does that mean that a simple control vs. treatment DESeq
analysis for a 10-sample experiment would have 7 degrees of freedom?
Got it. Thanks for the prompt reply!
Please expand on 'why' these expanded model matrices can be ignored.
We don’t use expanded model matrices in DESeq2 anymore. The vignette and workflow never use them and they are essentially deprecated.