DA.lsmeans: Run 'lsmeans' on all features from 'DAtest' results with...

View source: R/posthocs.R

DA.lsmeansR Documentation

Run lsmeans on all features from DAtest results with allResults = TRUE

Description

Pairwise testing on predictor and covars. Works on "poi", "neb", "lrm", "lma", "lmc", "llm", "llm2", "qpo", "znb", "zpo".

Usage

DA.lsmeans(
  results,
  variable = "predictor",
  predictor = NULL,
  covars = NULL,
  p.adj = "fdr",
  ...
)

Arguments

results

Output from a DA."test" function with allResults = TRUE

variable

Which variable to test. Default predictor. Alternatively, the name of a covar

predictor

If results come from a paired "lrm", "llm", "lma", "lmc" or "llm2" supply the original predictor variable in the form of as a vector

covars

If results come from a paired "lrm", "lma", "lmc", "llm" or "llm2" supply the original covars in the form of a named list

p.adj

P-value adjustment method. See p.adjust for details

...

Additional arguments for lsmeans function

Details

Require the lsmeans package

Value

A data.frame with output from lsmeans::pairs and adjusted p.values for each predictor and feature

Examples

# Creating random count_table and predictor
set.seed(5)
mat <- matrix(rnbinom(1500, size = 0.5, mu = 500), nrow = 100, ncol = 15)
rownames(mat) <- 1:100
pred <- c(rep("A", 5), rep("B", 5), rep("C", 5))

# Running linear model and then pairwise comparisons on each feature
res <- DA.lmc(mat, pred, allResults = TRUE)
res.lsm <- DA.lsmeans(res) 

Russel88/DAtest documentation built on March 24, 2022, 3:50 p.m.