Linear Model Fitting and Colinearity
1
0
Entering edit mode
Hugo • 0
@7220be07
Last seen 11 months ago
United States

Hello All, I have an RNAseq experiment with paired samples (before and after treatment). For each sample, I also have metadata on the patient such as sex. The only comparison that I care about is the before and after treatment for each patient (ie I would just do paired t-tests if this were a simple qPCR experiment and not using a general linear model).

I am using DESeq.

The problem is that if I want to regress out potentially confounding variables relating to the patient, it becomes colinear because if each patient has two samples, both samples will have the sample value. For example, patient A_pre and patient A_post will both have sex dummy encoded to 1 because they are both male. For clarity, my design is

design=~ sex + patient + treatment

And the sex term should regress out the effect of sex, while the patient term should regress out the patient effect (making it more similar to a paired t test). I would later analyze pre vs post (treatment condition).

Here is an example from metadata"

sample Patient sex Condition A_post A 0 post A_pre A 0 pre B_post B 0 post B_pre B 0 pre C_post C 1 post C_pre C 1 pre

Would anyone have any advice on how to regress out both sex and patient in my experiment? Or is there a better way to analyze the data? Thank you in advance for all your help!

dese DESeq2 • 761 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

The reason sex and patient are collinear is because they capture the same thing! You don't have to regress out sex and patient because if you block on patient, you by definition also regress out sex. Just block on patient and go from there.

ADD COMMENT
0
Entering edit mode

enter code hereThank you!

ADD REPLY

Login before adding your answer.

Traffic: 501 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