sparse.mediation.old: Conduct sparse mediation with elastic net (Old version)

Description Usage Arguments Details Value Author(s) References Examples

Description

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.

Usage

1
2
3
sparse.mediation.old(X, M, Y, tol = 10^(-10), max.iter = 100,
  lambda = log(1 + (1:50)/125), glmnet.penalty.factor = c(0, rep(1, 2 *
  V)), alpha = 1, tau = 1, verbose = FALSE)

Arguments

X

One-dimensional predictor

M

Multivariate mediator

Y

Outcome

tol

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

max.iter

(default=100) maximum iteration

lambda

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

glmnet.penalty.factor

(default=c(0,rep(1,2*V))) give different weight of penalization for the 2V mediation paths.

alpha

(defult=1) tuning parameter for L2 penalization

tau

(default=1) tuning parameter for L1 penality weighting for paths a and b.

verbose

(default=FALSE) print progress

Details

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.

Value

c directeffect

hatb Path b (M->Y given X) estimates

hata Path a (X->M) estimates

medest Mediation estimates (a*b)

alpha

lambda

nump Number of selected mediation paths

Author(s)

Seonjoo Lee, sl3670@cumc.columbia.edu

References

TBA

Examples

1
2
3
4
5
6
7
8
9
N=100
V=50
set.seed(1234)
a = rbinom(V,1,0.1)*5;b<-a
X = rnorm(N)
M =  X %*% t(a)+ matrix(rnorm(N*V),N,V)
Y =  X + M %*% b + rnorm(N)
sparse.mediation.old(X,M,Y,tol=10^(-10),
max.iter=100,lambda = log(1+(1:25)/50))

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