| SIS | R Documentation |
Step 1 of the TransHDM pipeline: dimension reduction via
Sure Independence Screening (SIS). Mediators are ranked based on the product
of their marginal associations with the exposure (alpha) and the outcome (beta).
Both associations are lasso point estimates. The top-ranked mediators are
retained for downstream de-biased lasso estimation
(mediation_inference, Step 2) and joint testing
(joint_test, Step 3).
The function supports transfer learning, allowing information from one or more source datasets to be leveraged to improve screening stability and robustness in the target dataset. A list of source datasets is row-bound into one source before screening.
SIS(
target_data,
source_data = NULL,
Y,
D,
M,
X,
topN = NULL,
transfer = FALSE,
verbose = TRUE,
ncore = 1
)
target_data |
A data frame containing the target dataset. All variables must be numeric. |
source_data |
A data frame, or a list of data frames, containing source
datasets (optional, default: NULL). All variables must be numeric and use
the same column names as |
Y |
Character string specifying the outcome variable name. |
D |
Character string specifying the exposure (treatment) variable name. |
M |
Character vector specifying mediator variable names. |
X |
Character vector specifying covariate variable names. |
topN |
An integer specifying the number of mediators to retain after screening.
If |
transfer |
A logical value (default: FALSE) indicating whether to apply transfer learning by incorporating the source dataset in the screening procedure. |
verbose |
A logical value (default: TRUE) controlling whether progress messages are printed to the console. |
ncore |
An integer (default: 1) specifying the number of CPU cores for parallel computation. |
A list of class "SIS" with the following components:
target_SIS: A data frame containing the outcome, exposure, selected
mediators, and covariates from the target dataset.
source_SIS: A data frame containing the same variables from the
pooled source dataset if transfer = TRUE; otherwise NULL.
M_ID_name_SIS: A character vector of selected mediator names.
Y: The resolved outcome variable name.
D: The resolved exposure variable name.
M: The full mediator variable names (before screening).
X: The resolved covariate variable names.
TransHDM, mediation_inference,
joint_test
set.seed(123)
# Target data
M_target <- matrix(rnorm(200 * 50), nrow = 200)
colnames(M_target) <- paste0("M", 1:50)
target_data <- data.frame(
Y = rnorm(200),
D = rnorm(200),
M_target,
X1 = rnorm(200)
)
# Source data
M_source <- matrix(rnorm(300 * 50), nrow = 300)
colnames(M_source) <- paste0("M", 1:50)
source_data <- data.frame(
Y = rnorm(300),
D = rnorm(300),
M_source,
X1 = rnorm(300)
)
# Run SIS
result <- SIS(
target_data = target_data,
source_data = source_data,
Y = "Y",
D = "D",
M = paste0("M", 1:50),
X = "X1",
transfer = TRUE,
topN = 10
)
result$M_ID_name_SIS
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.