Replies: 1 comment 1 reply
-
The predictor variables do not need to be good if you have plenty of them. After you run out of degrees of freedom (Residual component has 0 degrees of freedom), you can explain everything completely with any predictor variables. You may try with 55 random variables, and that will give you the same result: Residual 0 d.f. and sum of squares 0.000. You cannot reach your goal with your approach. If you had more data (more observations than predictor variables), you would get either sequential tests (terms assessed in the order they entered the model) or marginal tests (terms assessed for their unique contribution after all other terms). If you want to get the first-order effects of variables, or their contribution when they are the only variable entered in the model, you can fit corresponding Here an example how to do it with vegan data sets: library(vegan)
data(mite, mite.env)
d <- vegdist(mite, "hellinger") # use the same dissimilarity as in adonis2; "hellinger" in vegan 2.6-4
m0 <- dbrda(d ~ 1, mite.env) # Null model: no predictor variables
m1 <- dbrda(d ~ ., mite.env) # maximum model with all predictor variables: can have residual zero
add1(m0, m1, test = "permutation", permutations=999)
## Df AIC F Pr(>F)
## <none> 232.23
## SubsDens 1 231.34 2.8655 0.030 *
## WatrCont 1 212.05 25.3499 0.001 ***
## Substrate 6 232.24 1.9618 0.003 **
## Shrub 2 217.92 10.0146 0.001 ***
## Topo 1 221.66 13.3731 0.001 ***
## ---
## Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 If you want to get sums of squares, you need to write the loop yourself and catch the constrained total variance which in model |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I am trying to compute a PERMANOVA using Adonis2 with 110 factors. Essentially I want to find out the R2 for each factor and see how much it contributes to overall variation in microbiota composition.
When I add 50 factors to the model I get the following warning. I understand essentially this means that the factors I have already added to the model explain all variance but this cannot be true. I already know the 4 factors which should explain the most variance but they have not been added to the model yet.
Help greatly appreciated.
Kind regards,
P
Beta Was this translation helpful? Give feedback.
All reactions