Question: Extracting Residuals from Differential Expression Model
0
gravatar for JourneyToAbyss
6 months ago by
JourneyToAbyss90 wrote:

Code:

# Creation of robust model
design <-model.matrix(~Class+ PC1 + PC2 + PC3)
fit.robust <- lmFit(EL_bc_norm_0, design, method = "robust", maxit=500)
fit.robust.eBayes <- eBayes(fit.robust)

I am trying to extract the residuals out of the above model (named design) relating to each gene and subject. But because there isn't a "y" argument in the model.matrix() function, I am unable to use resid(). From what I understand (my background in statistics is weak) model.matrix() is actually finding the parameter estimates, which will later be use by topTable() to find group differences.

One thread says there no reason to examine residuals for microarray data (https://support.bioconductor.org/p/19622/) but nonetheless, I've been asked to do so.

Looking at another guide (http://jtleek.com/genstats/inst/doc/02_11_many-regressions.html) the traditional non-robust fitted model contains "residuals" but they seem to be absent in my fitted model (All I have is df.residual).

I can use "residuals(fit.robust, EL_bc_norm_0)". This appears to work but I am a bit hesitant about what I am doing.

Thank you!

ADD COMMENTlink modified 6 months ago • written 6 months ago by JourneyToAbyss90
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1193 users visited in the last hour