You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am analysing a microbiome dataset in which mice were sampled at two time points, before and after a treatment. I want to test if the communities are different before and after treatment.
I would like to use mouse_id as a blocking factor, as the initial state of the microbiomes differs between mice.
I understand that adonis is not designed to deal with random effects, but I was wondering if this could be dealt with by fitting mouse_id as a fixed effect? (as one could do in a linear model)
I get very different results when running the models with and without mouse_id as a fixed effect (here I am using a Bray-Curtis distance matrix).
'nperm' >= set of all permutations: complete enumeration.
Set of permutations < 'minperm'. Generating entire set.
Call:
adonis(formula = ps_recipient_KOWT_bc ~ as.factor(timepoint) + mouse_id, data = sample_df_KOWT)
Permutation: free
Number of permutations: 719
Terms added sequentially (first to last)
Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
as.factor(timepoint) 1 0.52713 0.52713 18.9481 0.81749 0.03333 *
mouse_id 2 0.06205 0.03102 1.1152 0.09623 0.63333
Residuals 2 0.05564 0.02782 0.08629
Total 5 0.64482 1.00000
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Would the latter model be correct?
I have also thought of using strata=mouse_id, though since I only have two samples per mouse, I think this would lead to a rather low number of permutations.
Kind regards,
Ricardo Ramiro
The text was updated successfully, but these errors were encountered:
Dear all,
I am analysing a microbiome dataset in which mice were sampled at two time points, before and after a treatment. I want to test if the communities are different before and after treatment.
I would like to use mouse_id as a blocking factor, as the initial state of the microbiomes differs between mice.
I understand that adonis is not designed to deal with random effects, but I was wondering if this could be dealt with by fitting mouse_id as a fixed effect? (as one could do in a linear model)
I get very different results when running the models with and without mouse_id as a fixed effect (here I am using a Bray-Curtis distance matrix).
Model without mouse_id
adonis(ps_recipient_KOWT_bc~as.factor(timepoint),data=sample_df_KOWT)
Model with mouse_id fitted as a fixed effect
adonis(ps_recipient_KOWT_bc~as.factor(timepoint)+mouse_id,data=sample_df_KOWT)
Would the latter model be correct?
I have also thought of using
strata=mouse_id
, though since I only have two samples per mouse, I think this would lead to a rather low number of permutations.Kind regards,
Ricardo Ramiro
The text was updated successfully, but these errors were encountered: