sparse.mediation: Sparse mediation for high-dimensional mediators Fit a...

Description Usage Arguments Value Author(s) References Examples

Description

Sparse mediation for high-dimensional mediators

Fit a mediation model via penalized maximum likelihood and structural equation model. The regularization path is computed for the lasso or elasticnet penalty at a grid of values for the regularization parameter lambda. Currently, mediation analysis is developed based on gaussian assumption.

Multiple Mediaton Model: (1) M = Xa + e1 (2) Y = Xc' + Mb + e2 And in the optimization, we do not regularize c', due to the assumption of partial mediation.

Usage

1
2
3
sparse.mediation(X, M, Y, tol = 10^(-5), max.iter = 50,
  lambda = log(1 + (1:30)/100), lambda2 = c(0.3, 0.5), alpha = 1,
  tau = 1, verbose = FALSE, Omega.out = FALSE)

Arguments

X

One-dimensional predictor

M

Multivariate mediator

Y

Outcome

tol

(default -10^(-5)) convergence criterion

max.iter

(default=100) maximum iteration

lambda

(default=log(1+(1:50)/125)) tuning parameter for L1 penalization

lambda2

(default=c(0.2,0.5)) tuning parameter for L1 penalization for covariance matrix, used only for p>n.

alpha

(default=1) tuning parameter for L2 penalization

tau

(default=1) tuning parameter for differentail weight between paths a (X -> M) and b (M -> Y)

verbose

(default=TRUE) print progress.

Omega.out

(defult=TRUE) output Omega estimates

Value

c: directeffect per each tuning parameter lambda. length(lambda)-dimensional vector

hatb: Path b (M->Y given X) estimates: V-by-lenbth(lambda) matrix

hata: Path a (X->M) estimates: V-by-lenbth(lambda) matrix

medest: Mediation estimates (a*b): V-by-lenbth(lambda) matrix

alpha: a scalor of the numing parameter for L2 regularization

lambda: a vector of tuning parameters for L1-penalization

tau: weight used.

nump: Number of selected mediation paths

Omega Estimated covariance matrix of the mediator

Author(s)

Seonjoo Lee, sl3670@cumc.columbia.edu

References

TBA

Examples

1
2
3
4
5
6
7
8
9
library(sparsemediation)
N=100
V=50
set.seed(1234)
a = rep(0,V);a[1:3]<-5;b<-a
X = rnorm(N)
M =  X %*% t(a)+ matrix(rnorm(N*V),N,V)
Y =  X + M %*% b + rnorm(N)
sparse.mediation(X,M,Y)

seonjoo/sparsemediation documentation built on June 8, 2019, 1:50 a.m.