I've been noticing some unexpected results, and it has me questioning how missing values are handled in lm (in R). Specifically, I have 200 samples, all but 5 of which have a null expression value for gene A. Of the 5 samples with expression values, 4 are in group A, 1 is in group C, and none are in group B.
I'm trying to find the log fold change between groups A and C, A and B, and B and C; specifically by running
fit <- lmFit(m, design) contrasts_matrix <- makeContrasts(contrasts=contrast_pairs, levels=design) fit2 <- contrasts.fit(fit, contrasts_matrix) fit2 <- eBayes(fit2)
The weird part is that this returns non-null values for A-B fold change and B-C fold change. Can anyone help me figure out why this is? It seems to me that since there are no samples in groupB, the fold changes should be null as well.