lotman: Low-throughput mediation analysis (Lotman)

View source: R/lotman.R

lotmanR Documentation

Low-throughput mediation analysis (Lotman)

Description

Low-throughput mediation analysis to test if rows of M mediate the effect of exposure E on outcome Y. Before applying Lotman, you should know a priori the direction that E changes Y and verify that E changes Y significantly and in the same direction here.

Usage

lotman(
  E,
  M,
  Y,
  covariates = NULL,
  fam = "gaussian",
  reorder.rows = TRUE,
  fdr.method = c("BH", "BY"),
  verbose = TRUE,
  check.names = TRUE
)

Arguments

E

A numeric vector of exposures.

M

A numeric matrix-like data object with one row per feature and one column per sample of mediators.

Y

A numeric vector of length(E) of outcomes. Only continuous, normally distributed outcomes currently supported.

covariates

Numeric vector with one element per sample or matrix-like object with rows corresponding to samples and columns to covariates to be adjusted for.

fam

Character string of family to use in generalized linear model of Y. The default "gaussian" reduces to the usual linear regression model. See stats::family.

reorder.rows

Logical, should rows be reordered by p-value?

fdr.method

Character string; either "BH" for Benjamini-Hochberg or "BY" for Benjamini-Yekutieli. See stats::p.adjust.

verbose

Logical; should messages be given for lack of association between E & Y and filtering?

check.names

Logical; should names(E)==colnames(M) & colnames(M)==names(Y) be checked?

Details

E and Y cannot have NAs. M may have some NAs, but rows that have less non-missing values than 5 + ncol(covariates) will be filtered out, and if verbose=TRUE, a message will be written with the number of rows filtered out.

Larger chi-square values are more significant.

Value

Data frame with columns

EMY.chisq

Overall chi-square for mediation on 1 degreee of freedom.

EMY.p

Overall p-value for mediation

EMY.FDR

Overall FDR for mediation

EM.z

z-score for E–>M, not accounting for direction

EM.p

p-value for E–>M, not accounting for direction

MY.z

z-score for M–>Y, not accounting for direction

MY.p

p-value for M–>Y, not accounting for direction


jdreyf/Hitman documentation built on April 12, 2025, 1:35 p.m.