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

View source: R/posthocs.R

DA.drop1R Documentation

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

Description

Works on "zpo", "znb", "qpo", "neb", "poi". Non-paired "lrm", "llm", "llm2", "lma", "lmc"

Usage

DA.drop1(results, test = "Chisq", p.adj = "fdr", ...)

Arguments

results

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

test

Which test to use to calculate p-values. See drop1 for details. Default "Chisq"

p.adj

P-value adjustment method. See p.adjust for details. Default "fdr"

...

Additional arguments for drop1 function

Value

A data.frame with output from drop1 and adjusted p.values for each predictor and feature

Examples

# Creating random count_table, predictor, and covariate
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))
covar <- rnorm(15)

# Running linear model and then drop1 on each feature
res <- DA.lmc(mat, pred, covars = list(Something = covar), allResults = TRUE)
res.drop <- DA.drop1(res) 

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