ezmediate: Call 'mediate' function in 'mediation' similarly to 'hitman'

View source: R/ezmediate.R

ezmediateR Documentation

Call mediate function in mediation similarly to hitman

Description

Call mediate function in mediation similarly to hitman.

Usage

ezmediate(E, M, Y, covariates = NULL, sims = 10^4)

Arguments

E

A numeric vector of exposures.

M

Vector of a potential mediator.

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.

sims

Number of simulations per analyte to calculate mediation.


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