reverseMA: reverseMA

Description Usage Arguments Value Author(s) Examples

View source: R/reverseMA.R

Description

The reverseMA function examines the direct and indirect path in mediation analysis when the mediator and outcome are (1) correctly specified and (2) incorrectly specified.

Usage

1
reverseMA(n = 1000, pX = 0.2, gamma0 = 0, gammaX = 0.1, varM = 1, beta0 = 0, betaX = 1, betaM = c(0, 0.1, 0.2), varY = 1, nSim = 100, nSimImai = 1000, SEED = 1, plot.pdf = T, plot.name = "reverseMAsim.pdf", alpha_level = 0.05)

Arguments

n

is the sample size of the population that is being simulated.

pX

is the MAF of the SNP

gamma0

is the intercept for the effect of the SNP on the mediator M

gammaX

is the effect of the SNP X on the mediator M

varM

varM

beta0

beta0

betaX

betaX

betaM

betaM

varY

varY

nSim

nSim

nSimImai

nSimImai

SEED

SEED

plot.pdf

T then a plot is produced

plot.name

the name of the plot produced

alpha_level

the significance level

Value

The function outputs a matrix of the results and produces a plot.

Author(s)

Sharon Lutz, Annie Thwing

Examples

1
	reverseMA(n = 100,nSim = 10)

SharonLutz/reverseMA documentation built on June 15, 2020, 7:20 p.m.