SMAHP

knitr::opts_chunk$set(
  collapse = TRUE,
  warning = FALSE,
  comment = "#>"
)

Introduction

Welcome to the SMAHP vignette! This document provides an overview of the SMAHP package. SMAHP (Survival Mediation Analysis of High-dimensional Proteogenomic data) is a novel method for survival mediation analysis that simultaneously handles high-dimensional exposures and mediators, integrates multi-omics data, and offers a robust statistical framework for identifying causal pathways on survival outcomes. SMAHP package is a software extension of our methodology work.

Installation

To install the package, please use:

#install.packages("SMAHP")

Example Usage

We will use the example data built in the package to demonstrate how to use the main function.

library(SMAHP)
# load example data
data("example_dat")

The example data is a simulated dataset for demonstration purpose. It contains exposure (X), mediators (M), covariates (C) and survival data (surv_dat).

surv_dat <- example_dat$surv_dat
res <- SMAHP(example_dat$X, example_dat$M, example_dat$C, 
             time = surv_dat$time, status = surv_dat$status)
print(res$p_final_matrix)
print(res$p_adjusted_matrix)
print(res$p_med_matrix)

The main function returns a list containing three matrices: (1) p_final_matrix, which is the raw p-value before adjustment, (2) p_adjusted_matrix, which contains p-values adjusted using the selected adjustment method, and (3) p_med_matrix, a mediation-exposure matrix encoded with 0s and 1s. In p_med_matrix, a value of 1 indicates a detected mediation association, while 0 means no significant mediation association. The NAs in p_final_matrix and p_adjusted_matrix mean the exposure-mediator pairs were not selected in previous steps.

The function get_sig_pathway can be used to extract the the name of exposure and mediator from identified significant mediation pathways with related adjusted p-values.

get_sig_pathway(res_SMAHP = res)

The function get_coef can be used to extract the the name of exposure and mediator from identified significant mediation pathways with related coefficient estimates.

get_coef(res_SMAHP = res)


Try the SMAHP package in your browser

Any scripts or data that you put into this service are public.

SMAHP documentation built on April 4, 2025, 1:36 a.m.