sparse.mediation.grplasso: Conduct sparse mediation with group LASSO

Description Usage Arguments Details Value Author(s) References Examples

View source: R/sparse.mediation.grplasso.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
sparse.mediation.grplasso(
  X,
  M,
  Y,
  tol = 10^(-10),
  max.iter = 100,
  lambda1 = 0.01,
  lambda2 = 1,
  alpha = 0,
  group.penalty.factor = c(1, rep(1, ncol(M))),
  penalty.factor = c(1, rep(1, ncol(M))),
  Omega.out = FALSE,
  verbose = FALSE,
  threshold = 0,
  non.zeros.stop = ncol(M)
)

Arguments

X

One-dimensional predictor

M

Multivariate mediator

Y

Outcome

tol

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

max.iter

(default=100) maximum iteration

lambda1

(default=exp(-5:0)) tuning parameter for c',a, b coefficients

lambda2

(default=exp(seq(0,0.5*log(ncol(M)),length=3))) tuning parameter for the Omega=Sigma_2^-1

alpha

(default=0) alpha=0, group lasso penalization will run

group.penalty.factor

(V+1)-dimensional group penalty factor vector. If a user does not want to penalize mediator, specify 0 otherwise 1. The first element is the direct effect followed by V-mediators. The default value is c(0,rep(1,V)).

penalty.factor

(1+2*V)-dimensional sparsity penalty factor vector.

threshold

(default=10^(-8))

non.zeros.stop

(default=ncol(M)) when to stop searching regularization path

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
10
11
N=100
V=50
set.seed(1234)
a = c(rep(1,3),rep(0,V-3));b<-a
X = rnorm(N)
M =  X %*% t(a)+ matrix(rnorm(N*V),N,V)
Y =  X + M %*% b + rnorm(N)
fit=sparse.mediation.grplasso(X,M,Y,verbose=FALSE,
lambda1 = exp(seq(-5,-1, length=10)),
alpha=c(0.95,0.75,0.5),lambda2=c(1,2),Omega.out = FALSE)
fit

seonjoo/smm documentation built on Feb. 11, 2021, 5:54 a.m.