I am using the below set of equations for my differential expression analysis. In the glmLRT line, I was previously specifying the coef by index and since I am interested in the "year_9_avg_pm_centered" variable, I was using 2 as the index. But 2 actually tests for the "GENDER" variable since intercept has the index 1 and the "year_9_avg_pm_centered" actually has index 3. Am I right in asusming this?
dds2 = DGEList(counts = raw_counts_no_outlier_2,remove.zeros = TRUE)
design_mat = model.matrix( ~ GENDER + year_9_avg_pm_centered + age_child_9_centered + flowcellID + EDUCM + areases_tert_9 , data = cov_mod2_no_outlier_ses_educm_new)
dds2 = estimateGLMCommonDisp(dds2, design_mat)
dds2 = estimateGLMTrendedDisp(dds2, design_mat)
dds2 = estimateGLMTagwiseDisp(dds2, design_mat)
fit_edgeR = glmFit (dds2, design_mat)
lrt.test = glmLRT(fit_edgeR, coef="year_9_avg_pm_centered") ## previously i had 2 here