Search
Question: interaction between continious and categorical variables
0
gravatar for fabian.roger
4 months ago by
fabian.roger0 wrote:

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

ADD COMMENTlink modified 4 months ago • written 4 months ago by fabian.roger0
2
gravatar for Michael Love
4 months ago by
Michael Love15k
United States
Michael Love15k wrote:

"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 COMMENTlink written 4 months ago by Michael Love15k

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 REPLYlink written 4 months ago by fabian.roger0

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 REPLYlink written 4 months ago by Michael Love15k
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.2.0
Traffic: 171 users visited in the last hour