The goal of sparsemediation is to conduct sparse mediation analysis.

Installation

You can install the released version of sparsemediation from CRAN with:

install.packages("sparsemediation")

And the development version from GitHub with:

Usage

The sparse.mediation function conducts sparse mediation for the specified tuning parameters for elastic net. Cross-validation is possible using cv.sparse.mediation.