microeco icon indicating copy to clipboard operation
microeco copied to clipboard

PerMANOVA for trans_alpha$cal_diff()

Open biazen123 opened this issue 1 year ago • 2 comments

Hi I did PerMANOVA for beta diversity cal_diff() in microeco package. Is that possible to apply it for Alpha diversity in trans_alpha$cal_diff() like other functions (Eg. KW, KW_dunn, anova etc) because PerMANOVA would be better to test the difference for experiments with an unbalanced design? If that is, looking for your suggestion how to run it in microeco. Regards!

biazen123 avatar Feb 01 '24 02:02 biazen123

Hi. To temporarily apply it, how about converting the alpha diversity to a Euclidean distance matrix and view it as a "beta diversity" dismilarity matrix like the following shows?

library(microeco)
data(dataset)
dataset$cal_alphadiv()
tmp <- as.matrix(dist(dataset$alpha_diversity[, "Shannon", drop = F]))
dataset$beta_diversity$tmp <- tmp
t1 <- trans_beta$new(dataset = dataset, group = "Group", measure = "tmp")
t1$cal_manova(manova_all = TRUE)
t1$res_manova

Best, Chi

ChiLiubio avatar Feb 01 '24 05:02 ChiLiubio

Hi Chi Thank you very much for your prompt suggestions.

biazen123 avatar Feb 01 '24 06:02 biazen123