Skip to content

A more efficient two-stage cross-fitted estimation procedure for the R-squared(R2)-based total mediation effect measure in high-dimensional setting

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

zhichaoxu04/CFR2M

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CFR2M: Efficient interval estimation for high-dimensional Cross-Fitting R2-based Mediation effect

Important

For more details, please refer to our preprint Speeding up interval estimation for R2-based mediation effect of high-dimensional mediators via cross-fitting (Xu et al). For the code used to perform simulations or real data analysis in the paper, please refer to CFR2M-paper.

The CFR2M R package constructs confidence intervals based on the newly-derived closed-form asymptotic distribution of the R-squared measure. To avoid potential bias, we perform iterative Sure Independence Screening (iSIS) and False Discovery Rate (FDR) control in two subsamples to exclude the non-mediators, followed by ordinary least squares (OLS) regressions for the variance estimation.


R2-based total mediation effect measure

$R^2_{Med}$ is defined as the variance of the outcome variable that is common to both exposure and mediators or taking a step further, explained by the exposure through the mediators. $R^2_{Med}$ is essentially an additive function of the variance of the outcome explained by the exposure, mediators, and exposure and mediators.


Get started

Download and install:

  • Download CFR2M package from Github using:
git clone https://github.com/zhichaoxu04/CFR2M.git
  • Or, install CFR2M package in R directly

    • First, install devtools in R from CRAN:
      install.packages("devtools")
    • Then, install CFR2M using the install_github function and load the package:
      devtools::install_github("zhichaoxu04/CFR2M")
      library(CFR2M)
  • Make sure that all the required packages have been installed or updated. Here are some of the required packages:

    • RsqMed: An implementation of calculating the R-squared measure as a total mediation effect size measure and its confidence interval for moderate- or high-dimensional mediator models. It gives an option to filter out non-mediators using variable selection methods. The original R package is directly related to the paper Yang et al (2021).
    • SIS: Variable selection techniques are essential tools for model selection and estimation in high-dimensional statistical models. Through this publicly available package, they provide a unified environment to carry out variable selection using iterative sure independence screening (SIS) (Fan and Lv (2008)) and all of its variants in generalized linear models (Fan and Song (2009)) and the Cox proportional hazards model (Fan, Feng and Wu (2010)).
    • HDMT: A multiple-testing procedure for high-dimensional mediation hypotheses. Mediation analysis is of rising interest in epidemiology and clinical trials. Methods used in the package refer to James Y. Dai, Janet L. Stanford & Michael LeBlanc (2020).
    • dplyr: A Grammar of Data Manipulation: a fast, consistent tool for working with data frame like objects, both in memory and out of memory.
  • CFR2M is also available in the R package RsqMed.

About

A more efficient two-stage cross-fitted estimation procedure for the R-squared(R2)-based total mediation effect measure in high-dimensional setting

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages