micro_forest: Create forest plots from negative binomial taxa models

Description Usage Arguments Value Examples

View source: R/micro_forest.R

Description

Create forest plots for specified coefficients in negative binomial taxa models. Plots estimated beta coefficients and confidence intervals

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
micro_forest(
  modsum,
  ...,
  main,
  ylab,
  xlab,
  subtitle,
  legend_title,
  legend_labs
)

Arguments

modsum

The output from nb_mods

...

The covariate you'd like to plot. Must be in the models created by nb_mods

main

The title for your plot

ylab

The label for the y-axis; default is "Taxa"

xlab

The label for the x-axis; default is output from function "TeX"

subtitle

The plot subtitle

legend_title

The title of the plot's legend

legend_labs

The names of the elements within the legend

Value

Returns a ggplot that you can add geoms to if you'd like

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(phy); data(cla); data(ord); data(fam); data(met)

otu_tabs = list(Phylum = phy, Class = cla, Order = ord, Family = fam)
set <- tidy_micro(otu_tabs = otu_tabs, meta = met) \
filter(day == 7) ## Only including the first week

## Creating negative binomial models on filtered tidi_micro set
nb_fam <- set \
otu_filter(prev_cutoff = 5, ra_cutoff = 0.1,
exclude_taxa = c("Unclassified", "Bacteria")) \
nb_mods(table = "Family", bpd1)

nb_fam \

CharlieCarpenter/tidy.micro documentation built on Jan. 19, 2020, 6:28 p.m.