I'm doing a DNA methylation analysis using the limma package. The idea is to explore if there is a dose-response between exposure (pm2.5) and methylated CpG sites. Here is my code. I would like to know how can I do the linear assumption using the limma package.
dx <- with(phenoData.final, model.matrix(~ work_duration + Age + BMI + race)) csub <- combat.adjust[sample(seq(1, dim(combat.adjust)), 10000),] dc <- duplicateCorrelation(csub, design = dx, block = as.factor(Id.long)) pm.cont <- lmFit(combat.adjust, design = dx, block = as.factor(Id.long), correlation = dupcor.combat.fire$consensus) pm.cont.eb <- eBayes(pm.cont) pm.Cont <- topTable(pm.cont.eb, coef = 2, n = dim(M), sort = "p", confint = 0.95, adjust.method = "bonferroni")