The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Title: Large Scale Single Mediator Hypothesis Testing
Version: 1.0.2
URL: https://github.com/umich-cphds/medScan
BugReports: https://github.com/umich-cphds/medScan/issues
Description: A collection of methods for large scale single mediator hypothesis testing. The six included methods for testing the mediation effect are Sobel's test, Max P test, joint significance test under the composite null hypothesis, high dimensional mediation testing, divide-aggregate composite null test, and Sobel's test under the composite null hypothesis. Du et al (2023) <doi:10.1002/gepi.22510>.
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.2.3
Imports: HDMT, locfdr, qqman, qvalue, fdrtool
Depends: R (≥ 3.5),
Suggests: knitr, rmarkdown
NeedsCompilation: no
Packaged: 2024-03-05 21:23:34 UTC; mk
Author: Jiacong Du [aut], Michael Kleinsasser [cre]
Maintainer: Michael Kleinsasser <mkleinsa@umich.edu>
Repository: CRAN
Date/Publication: 2024-03-06 01:00:12 UTC

Large Scale Single Mediator Hypothesis Testing

Description

A collection of methods for large scale single mediator hypothesis testing. The six included methods for testing the mediation effect are Sobel's test, Max P test, joint significance test under the composite null hypothesis, high dimensional mediation testing, divide-aggregate composite null test, and Sobel's test under the composite null hypothesis. Du, J., Zhou, X., Hao, W., Liu, Y., Smith, J. A., & Mukherjee, B. (2022). "Methods for Large-scale Single Mediator Hypothesis Testing: Possible Choices and Comparisons."

Usage

medScan(z.alpha, z.beta, method)

Arguments

z.alpha

the z-test statistic for alpha (exposure effect on the mediator).

z.beta

the z-test statistic for beta (mediator effect on the outcome).

method

the method to use for testing the mediation effect. It should belong to one of the six methods: "Sobel", "MaxP", "JT_comp", "HDMT", "DACT", and "Sobel_comp". (1) Sobel’s test (method = "Sobel"), (2) Max P test (method = "MaxP"), (3) joint significance test under the composite null hypothesis (method = "JT_comp"), (4) high dimensional mediation testing (method = "HDMT"), (5) Divide-Aggregate Composite-null Test (method = "DACT"), and (6) Sobel’s test under the composite null hypothesis (method = "Sobel_comp").

Details

The available methods are: (1) Sobel’s test (method = "Sobel"), (2) Max P test (method = "MaxP"), (3) joint significance test under the composite null hypothesis (method = "JT_comp"), (4) high dimensional mediation testing (method = "HDMT"), (5) Divide-Aggregate Composite-null Test (method = "DACT"), and (6) Sobel’s test under the composite null hypothesis (method = "Sobel_comp").

We incorporated code from the DACT R package formerly on CRAN. Author: Zhonghua Liu Maintainer: Zhonghua Liu, zhhliu@hku.hk.

Value

A list that contains

pvalues:

p-values for all mediators from the chosen method.

pi:

the estimated proportions of the three null cases from the HDMT method. pi00 is the proportion of alpha=beta=0; pi01 is the proportion of alpha=0 and beta!=0; and pi10 is the proportion of alpha!=0 and beta=0.

References

Sobel, M. E. (1982). Asymptotic confidence intervals for indirect effects in structural equation models. Sociological methodology, 13, 290-312.

MacKinnon, D. P., Lockwood, C. M., Hoffman, J. M., West, S. G., & Sheets, V. (2002). A comparison of methods to test mediation and other intervening variable effects. Psychological methods, 7(1), 83.

Huang, Y. T. (2019). Genome-wide analyses of sparse mediation effects under composite null hypotheses. The Annals of Applied Statistics, 13(1), 60-84.

Liu, Z., Shen, J., Barfield, R., Schwartz, J., Baccarelli, A. A., & Lin, X. (2022). Large-scale hypothesis testing for causal mediation effects with applications in genome-wide epigenetic studies. Journal of the American Statistical Association, 117(537), 67-81.

Dai, J. Y., Stanford, J. L., & LeBlanc, M. (2022). A multiple-testing procedure for high-dimensional mediation hypotheses. Journal of the American Statistical Association, 117(537), 198-213.

Du, Jiacong, et al. "Methods for large‐scale single mediator hypothesis testing: Possible choices and comparisons." Genetic Epidemiology 47.2 (2023): 167-184.

Examples

# simulate data under the mixture null
n=10000
u = runif(n,0,1)
z.alpha = z.beta = rep(NA,0)
pi00 = 0.98
pi10 = 0.01
pi01 = 0.01
for(i in 1:n){
  if(u[i]<=pi00){
    z.alpha[i] = rnorm(1, 0, 1)
    z.beta[i] = rnorm(1, 0, 1)
  } else if (u[i]<= pi00+pi10){
    z.alpha[i] = rnorm(1, 1, 1)
    z.beta[i] = rnorm(1, 0, 1)
  } else {
    z.alpha[i] = rnorm(1, 0, 1)
    z.beta[i] = rnorm(1, 1, 1)
  }
}

# obtain p-values

# method = "Sobel", "MaxP", "HDMT", "Sobel_comp", "JT_comp", "DACT"
obj = medScan(z.alpha = z.alpha, z.beta = z.beta, method = "Sobel")
qqman::qq(obj$pvalues,  xlim = c(0,4), ylim = c(0,4), main = "Sobel")




These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.