sparse.mediation.largep_omega0: Conduct sparse mediation for parge p ( p > n) with L1 or L2...

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.largep_omega0(X, M, Y, tol = 10^(-10), max.iter = 10,
  lambda2 = 0.3, lambda1 = seq(0.02, 0.4, length = 5), tau = 1,
  alpha = 1, verbose = FALSE, Omega.out = TRUE)

Arguments

X

One-dimensional predictor

M

Multivariate mediator

Y

Outcome

tol

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

max.iter

(default=100) maximum iteration

lambda2

Tuning parameter for Covariance matrix L1 penalization

lambda1

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

tau

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

alpha

(defult=1) tuning parameter for L2 penalization

verbose

(default=FALSE) print progress

Omega.out

(defult=TRUE) output Omega estimates

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

lambda1 Tuning parameters for regression coefficients

lambda2 Tuning parameters for inversed covariance matrix (Omega)

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
10
11
12
13
14
15
library(sparsemediation)
N=100
V=200
set.seed(1234)
covmat=matrix(0,V+2,V+2);
covmat[1,2]=0.5;
covmat[1, (1:3)+2]=rep(0.5,3);
covmat[2, (1:3)+2]=rep(0.5,3);
covmat=covmat+t(covmat);diag(covmat)<-1
sqrtmat = sqrtmat.comp(covmat)
tmpmat = matrix(rnorm(N*(V+2)),N,V+2) %*% sqrtmat
X=tmpmat[,1]
Y=tmpmat[,2]
M=tmpmat[,-c(1:2)]
#sparse.mediation.largep_omega0(X,M,Y)

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