A query about selecting the coefficient in glmLRT to test for by index
1
0
Entering edit mode
S • 0
@0b4d0d5b
Last seen 3 months ago
Norway

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
edgeR • 545 views
ADD COMMENT
1
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

It actually depends on how many levels the factor GENDER has. If GENDER has two levels then year_9_avg_pm_centered will be the 3rd coefficient. Anyway, it is easy to check -- you can type

colnames(fit_edgeR)

or equivalently

colnames(design_mat)

to see all the coefficients and their names.

ADD COMMENT

Login before adding your answer.

Traffic: 1019 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6