Hello,
I am performing a differential analysis with limma, I have three groups: a control group, and two disease groups (D1 and D2), and I want to perform two contrasts, D1- CTRL and D2-CTRL whilst blocking for a variable “site”.
The site variable is quite unbalanced:
> table(sampDat$joinedGroup, sampDat$site) arm back leg scalp CTRL 14 99 100 0 D1 37 2 44 0 D2 10 90 1 19
As you can see the control group has 0 scalp samples, and D2 has 19 scalp samples. Further, there are very low numbers of back in D1 and leg in D2.
My current solution is a standard cell means model with site as a blocking factor:
f <- factor(sampDat$joinedGroup)
site <- factor(sampDat$site)
design <- model.matrix(~0 + f + site)
fit <- lmFit(affyTable, design)
contrastMatrix <- makeContrasts(fD1-fCTRL,
fD2-fCTRL,
levels = colnames(design))
fit2 <- contrasts.fit(fit, contrastMatrix)
fit2 <- eBayes(fit2)
tt_1 <- topTable(fit2, coef = 1, adjust.method = "BH",n = "inf", p = 0.05)
Which gives me expected results.
My question is in regards to the unbalanced blocking factor. I'm trying to understand how limma is dealing with the unbalanced design, particularly with regards to the scalp level. Could someone comment on what is the model estimating for this level?
Thanks,
Owen