How does DESeq2 account for the dependency between samples in repeated 16S data, for example, relative abundance for samples from the same child?
Following the vignette section on time series, I've written the code below, which runs fine but I'm nervous that the variance is being underestimated, since I don't see a way to include the info about which samples are from the same child.
dds <- DESeqDataSetFromMatrix(countData = count.table, colData = coldata, design = ~ case + time + time.case)
dds <- DESeq(dds, test="LRT", reduced=~time.case) results(dds)
I want to see whether the change over time is similar between two groups of patients. That's the interaction between group and time, but this is not full rank when including patient as an additional factor. That is, the model, ~patient + case+ time+ case.time is not estimable.
We have a section in the vignette on how to compare across groups when individuals are nested within groups:
https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#group-specific-condition-effects-individuals-nested-within-groups
OK, that looks more reasonable. Thank you for your help!