aldex.glm: Calculate glm test statistics using a 'model.matrix'

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/clr_glm-tpq.R

Description

aldex.glm calculates the expected values for each coefficient of a glm model on the data returned by aldex.clr. This function requires the user to define a model with model.matrix.

Usage

1
aldex.glm(clr, verbose = FALSE, ...)

Arguments

clr

An ALDEx2 object. The output of aldex.clr.

verbose

A boolean. Toggles whether to print diagnostic information while running. Useful for debugging errors on large datasets. Applies to effect = TRUE.

...

Arguments passed to glm.

Value

Returns a data.frame of the average coefficients and their p-values for each feature, with FDR appended as a BH column.

Author(s)

Thom Quinn

References

Please use the citation given by citation(package="ALDEx2").

See Also

aldex, aldex.clr, aldex.ttest, aldex.kw, aldex.glm, aldex.effect, aldex.corr, selex

Examples

1
2
3
4
5
6
7
8
data(selex)
#subset for efficiency
selex <- selex[1201:1600,]
covariates <- data.frame("A" = sample(0:1, 14, replace = TRUE),
                         "B" = c(rep(0, 7), rep(1, 7)))
mm <- model.matrix(~ A + B, covariates)
x <- aldex.clr(selex, mm, mc.samples=1, denom="all")
glm.test <- aldex.glm(x)

ALDEx2 documentation built on Nov. 8, 2020, 8:05 p.m.