interaction between continious and categorical variables
1
0
Entering edit mode
@fabianroger-13931
Last seen 4.2 years ago

Hey,

I am using Deseq2 in conjuncture with Phyloseq to check for deferentially abundant OTUs along a natural gradient. My sample come from different habitats and I know that the community composition differs between the habitats. I am interested in which OTUs co-vary with the continuous predictor in each habitat (4 levels). I tried the following model:

~ Habitat + continuous_predictor + Habitat:continuous_predictor

followed by results ( ... name = Habitat_1.continuous_predictor). Yet as is stated in Eaxmple 3 in the ?Results documentation:

"this tests if the condition effect is different in III compared to I". I don't think that this is what I want. I am not interested if the relationship (slope) of, say, OTU_1 with the continuous predictor differs in Habitat_2 compared to the reference habitat 1. I am interested which OTUs co-vary with the continuous predictor - conditional on habitat.

Therefor I think it would be better to split the data by habitat and run 4 models independently. Would you agree? I was thinking that turning of independent filtering, recording all the p-values, and then perform p-value adjustment with independent filtering on the joint pvalues. Would that make sense? Thanks a lot for your support!

Fabian

deseq2 r • 748 views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

"I am interested which OTUs co-vary with the continuous predictor - conditional on habitat"

Do you mean, "controlling for habitat differences"?

If so, you can use ~habitat + predictor. 

ADD COMMENT
0
Entering edit mode

thanks for coming back to me!

would your model not only account for the main effect of habitat (i.e. different mean abundance?). I hypothesise that any OTU that covaries with the continuous predictor will only do so in some habitats but not in others (where it might not even be present). Sorry if I am missing the obvious.

 

Fabian

ADD REPLY
0
Entering edit mode

Oh I didn't understand the question at first. You should use a design of ~Habitat + Habitat:continuous_predictor, which will give a different slope for each habitat.

ADD REPLY

Login before adding your answer.

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