how to compare diversity within and between groups? (comparison alpha x beta diversity)

Hi everyone,
I'm working with microbiome data and I'm interested to see if the diversity within my groups (I have 10 groups with 5 samples each) is higher or lower than the diversity between the groups (like comparing alpha x beta diversity). According to Xia & Sun, 2017 (paper: Hypothesis testing and statistical analysis of microbiome), it is possible to use ANOSIM function to "compare within- and between-group similarity through a distance measure". However, I tried it but it doesn't seem to give an equivalent result to what I'm looking for. Here what I tried:

Rt_2nd_18.clr <- microbiome::transform(Rt_2nd_18, "clr") (phyloseq object, S4 class)
otu_Rt_2nd_18 <- abundances(Rt_2nd_18.clr) (OTU abundances)
meta_Rt_2nd_18 <- meta(Rt_2nd_18.clr) (metadata file)

dist.Rt.2nd.18 <- vegdist(t(otu_Rt_2nd_18), method="euclidean")
anosim(dist.Rt.2nd.18, meta_Rt_2nd_18$lake, permutations = 9999) (group of interest = lake)

And got this as output:

Call:
anosim(x = dist.Rt.2nd.18, grouping = meta_Rt_2nd_18$lake, permutations = 9999) 
Dissimilarity: euclidean 

ANOSIM statistic R: 0.8634 
      Significance: 1e-04 

Permutation: free
Number of permutations: 9999

So, it gives only global R and p values, and here comes my questions:
(1) Does it mean that, in general, alpha and beta diversity are different? (but not specifying which is higher or lower) Or does it mean purely that the lakes are different?
(2) Can I get a p-value for each lake? Related to the alpha and beta diversity comparison?
(3) Is Anosim a good option for that question or it there a better tool?
I hope it was clear to understand!

Thanks a lot in advance

Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.

Many of the regulars here can help explain problems like these by reading the documentation and working the examples. (Only because we're experienced in how R documentation works in terms of arguments and values.) But in narrow domains, it's hit-or-miss finding someone familiar with the domain and the packages. It's really hard for the rest of us to dive into this type of question if we have to reverse engineer the problem.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.