Hi,
I'm trying to fit a mixed model with distance matrix. I'm trying adonis. And based on their vignette FAQ page:
Can I have random effects in constrained ordination or in adonis?
No. Strictly speaking, this is impossible. However, you can define models that respond to similar goals as random effects models, although they strictly speaking use only fixed effects.
....... Function adonis2 can evaluate terms sequentially. In a model with right-hand-side ~ A + B the effects of A are evaluated first, and the effects of B after removing the effects of A.
The patient_ID is the random variable, so based on the vignette FAQ page, I should fit a model like this:
adonis2(formula = UC.CD.dist ~ patient_ID + diagnosis_mod, data = Sample.UC.CD)
But I'm confused why the result doesn't include variable "diagnosis_mod"
Df SumOfSqs R2 F Pr(>F)
patient_ID 217 33.466 0.68547 6.1867 0.001 ***
Residual 616 15.356 0.31453
Total 833 48.821 1.00000
And if I revise the order of patient_ID and diagnosis_mod like this:
adonis2(formula = UC.CD.dist ~ diagnosis_mod + patient_ID , data = Sample.UC.CD)
And this time the result include both diagnosis and patient_ID:
Df SumOfSqs R2 F Pr(>F)
diagnosis_mod 1 0.739 0.01513 29.6324 0.001 ***
patient_ID 216 32.727 0.67034 6.0781 0.001 ***
Residual 616 15.356 0.31453
Total 833 48.821 1.00000
My question is:
- why the first model doesn't have stats for both variables?
- if the first model does give stats for both variables, can I interpret it as "with random variable patient_ID, the fix variable diagnosis_mod has the p-value of xxx"?
Thanks!
Leran