hilma {freebird}R Documentation

Estimation and Inference for High Dimensional Mediation Analysis

Description

This function implements the estimation and inference for the indirect effect in high dimensional linear mediation analysis models. It provides estimates and p-values under both incomplete mediation, where a direct effect may exist, as well as complete mediation, where the direct effect is known to be absent.

Usage

hilma(
  Y,
  G,
  S,
  mediation_setting = "incomplete",
  tuning_method = "uniform",
  lam_list = NA,
  min.ratio = 0.1,
  n.lambda = 5,
  center = TRUE
)

Arguments

Y

The n-dimensional outcome vector.

G

The n by p mediator matrix. p can be larger than n.

S

The n by q exposure matrix. q can be 1, and q < n is required.

mediation_setting

Either ‘incomplete’ or ‘complete’

tuning_method

‘uniform’ or ‘aic’, the default is ‘uniform’

lam_list

tuning parameter for uniform tuning or list of tuning parameter for aic tuning

min.ratio

the ratio of the minimum lambda to the maximum

n.lambda

number of tuning parameters to choose from

center

center the data or not, the default is TRUE

Value

A list with components:

beta_hat

estimated indirect effect

alpha1_hat

estimated direct effect

pvalue_beta_hat

the p value for testing the significance of the indirect effect

lambda_used

lambda used during optimization

Author(s)

Ruixuan Zhou

Examples

n = 30
p = 50
q = 2
G = MASS::mvrnorm(n, rep(0,p), diag(p))
S = as.matrix(MASS::mvrnorm(n, rep(0,q), diag(q)))
Y = as.matrix(rnorm(n))
out = hilma(Y,G,S, mediation_setting = 'complete', tuning_method = 'uniform', lam_list = 0.2)
out

[Package freebird version 1.0 Index]