View source: R/gv_betadisper.R
run_betadisper | R Documentation |
The run_betadisper
function is a multivariate analogue of Levene's test
for homogeneity of variances.
run_betadisper(
object,
level = c(NULL, "Kingdom", "Phylum", "Class",
"Order", "Family", "Genus",
"Species", "Strain", "unique"),
variable,
type = c("median","centroid"),
method = c("unifrac", "wunifrac", "GUniFrac", "bray", "dpcoa", "jsd"),
seedNum = 123,
alpha = 0.5)
object |
(Required). a |
level |
(Optional). character. Summarization
level (from |
variable |
(Required). character. grouping variable for test. |
type |
(Optional). character. the type of analysis to perform. Use the spatial "median" or the group "centroid" (default: "median"). |
method |
(Optional). character. Provide one of the currently supported
options. See
|
seedNum |
(Optional). numeric. specify seeds for reproduction (default: 123). |
alpha |
(Optional). numeric. the parameter for "GUniFrac" controlling weight on abundant lineages (default: 0.5). |
One measure of multivariate dispersion (variance) for a group of samples is
to calculate the average distance of group members to the group centroid or
spatial median (both referred to as 'centroid' from now on unless stated
otherwise) in multivariate space. To test if the dispersions (variances)
of one or more groups are different, the distances of group members to
the group centroid are subject to ANOVA. This is a multivariate analogue
of Levene's test for homogeneity of variances if the distances between
group members and group centroids is the Euclidean distance.
See ?vegan::betadisper
for more details. It can be applied to both
phyloseq::phyloseq
and SummarizedExperiment::SummarizedExperiment
object.
A betadisper model.
Created by Hua Zou (5/15/2022 Shenzhen China)
Anderson, Marti J., Kari E. Ellingsen, and Brian H. McArdle. "Multivariate dispersion as a measure of beta diversity." Ecology letters 9.6 (2006): 683-693.
## Not run:
# phyloseq object
data("Zeybel_2022_gut")
run_betadisper(Zeybel_2022_gut,
level = "Phylum",
variable = "LiverFatClass",
method = "bray")
# SummarizedExperiment object
data("Zeybel_2022_protein")
run_betadisper(Zeybel_2022_protein,
variable = "LiverFatClass",
method = "bray")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.