I did a MANOVA in R from 10 PCA dimensions I extracted from the result of that analysis with this code: manova_ <- manova(cbind(Dim.1, Dim.2, Dim.3, Dim.4, Dim.5, Dim.6, Dim.7, Dim.8, Dim.9, Dim.10) ~ species, data = data_)

The shapiro.test(resid()) gave me a negative result, so I'll have to do a PERMANOVA analysis, with adonis2 (My professor's recommendation). I dont actually understand how the formula works in that situation, which I use a variable that contains species, (so it's an unequal and repetitive number of different species). I tried to do the code, but it said that input data must be numeric (I only used one dimension for now, but intend to use 10 if it works):

adonis2(formula = species ~ Dim.1, data = data_, permutations = 999, method = "bray", sqrt.dist = FALSE, add = FALSE, by = "terms", strata = NULL, parallel = get0ption("mc.cores"), na.action = na.fail)

I'm still a begginer at R, so if you have any recommendation that'll be very nice.

Thank you!



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.