taxa_stats | R Documentation |
A convenience wrapper for taxa_table()
+ stats_table()
.
taxa_stats(
biom,
regr = NULL,
stat.by = NULL,
rank = -1,
taxa = 6,
lineage = FALSE,
unc = "singly",
other = FALSE,
split.by = NULL,
transform = "none",
test = "emmeans",
fit = "gam",
at = NULL,
level = 0.95,
alt = "!=",
mu = 0,
p.adj = "fdr"
)
biom |
An rbiom object, such as from |
regr |
Dataset field with the x-axis (independent; predictive)
values. Must be numeric. Default: |
stat.by |
Dataset field with the statistical groups. Must be
categorical. Default: |
rank |
What rank(s) of taxa to display. E.g. |
taxa |
Which taxa to display. An integer value will show the top n
most abundant taxa. A value 0 <= n < 1 will show any taxa with that
mean abundance or greater (e.g. |
lineage |
Include all ranks in the name of the taxa. For instance,
setting to |
unc |
How to handle unclassified, uncultured, and similarly ambiguous taxa names. Options are:
Abbreviations are allowed. Default: |
other |
Sum all non-itemized taxa into an "Other" taxa. When
|
split.by |
Dataset field(s) that the data should be split by prior to
any calculations. Must be categorical. Default: |
transform |
Transformation to apply. Options are:
|
test |
Method for computing p-values: |
fit |
How to fit the trendline. |
at |
Position(s) along the x-axis where the means or slopes should be
evaluated. Default: |
level |
The confidence level for calculating a confidence interval.
Default: |
alt |
Alternative hypothesis direction. Options are |
mu |
Reference value to test against. Default: |
p.adj |
Method to use for multiple comparisons adjustment of
p-values. Run |
A tibble data.frame with fields from the table below. This tibble
object provides the $code
operator to print the R code used to generate
the statistics.
Field | Description |
.mean | Estimated marginal mean. See emmeans::emmeans() . |
.mean.diff | Difference in means. |
.slope | Trendline slope. See emmeans::emtrends() . |
.slope.diff | Difference in slopes. |
.h1 | Alternate hypothesis. |
.p.val | Probability that null hypothesis is correct. |
.adj.p | .p.val after adjusting for multiple comparisons. |
.effect.size | Effect size. See emmeans::eff_size() . |
.lower | Confidence interval lower bound. |
.upper | Confidence interval upper bound. |
.se | Standard error. |
.n | Number of samples. |
.df | Degrees of freedom. |
.stat | Wilcoxon or Kruskal-Wallis rank sum statistic. |
.t.ratio | .mean / .se |
.r.sqr | Percent of variation explained by the model. |
.adj.r | .r.sqr , taking degrees of freedom into account. |
.aic | Akaike Information Criterion (predictive models). |
.bic | Bayesian Information Criterion (descriptive models). |
.loglik | Log-likelihood goodness-of-fit score. |
.fit.p | P-value for observing this fit by chance. |
Other taxa_abundance:
sample_sums()
,
taxa_boxplot()
,
taxa_clusters()
,
taxa_corrplot()
,
taxa_heatmap()
,
taxa_stacked()
,
taxa_sums()
,
taxa_table()
Other stats_tables:
adiv_stats()
,
bdiv_stats()
,
distmat_stats()
,
stats_table()
library(rbiom)
biom <- rarefy(hmp50)
taxa_stats(biom, stat.by = "Body Site", rank = "Family")[,1:6]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.