computebic: Compute BIC scores for model selection

Description Usage Arguments Value Author(s) References Examples

View source: R/computebic.R

Description

Compute BIC scores for model selection

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
computebic(
  X,
  Y,
  M,
  a,
  b,
  c,
  tol = 10^(-10),
  max.iter = 100,
  grpgroup = c(1, rep(1:ncol(M) + 1, 2)),
  threshold = 0
)

Arguments

X

One-dimensional predictor

Y

Outcome

M

Multivariate mediator

tol

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

max.iter

(default=100) maximum iteration

grpgroup

(default=c(1,rep( 1:V +1,2)))

lambda

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

penalty.factor

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

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
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)

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