Confounding variables may mask the actual differential features. This function utilizes constrained correspondence analysis (CCA) to measure the confounding factors.
confounder(
  ps,
  target_var,
  norm = "none",
  confounders = NULL,
  permutations = 999,
  ...
)a phyloseq::phyloseq object.
character, the variable of interest
norm the methods used to normalize the microbial abundance data. See
normalize() for more details.
the confounding variables to be measured, if NULL, all
variables in the meta data will be analyzed.
the number of permutations, see vegan::anova.cca().
extra arguments passed to vegan::anova.cca().
a data.frame contains three variables: confounder,
pseudo-F and p value.
data(caporaso)
confounder(caporaso, "SampleType", confounders = "ReportedAntibioticUsage")
#>                confounder pseudo_F pvalue
#> 1 ReportedAntibioticUsage 1.193135  0.258