Showing posts with label mediation analysis. Show all posts
Showing posts with label mediation analysis. Show all posts

Tuesday, August 01, 2023

Mediation Analysis vs. Landmark Analysis for Clinical Trial Data

Mediation analysis and Landmark analysis are two valuable statistical tools in different contexts, providing insights into different aspects of data analysis. Both methods can be utilized to investigate if a surrogate endpoint or short-term measure can predict the long-term clinical endpoint or to investigate if short-term measures can be mediators for the long-term clinical endpoint. Both mediation analysis and landmark analysis are useful tools for post-hoc, exploratory analyses, but not the primary analysis method for the primary efficacy endpoint. 

Mediation analysis is a statistical method used to explore and understand the mechanism or process through which an independent variable influences a dependent variable. It helps to determine whether the effect of an independent variable on a dependent variable is mediated (i.e., transmitted through) one or more intermediate variables, often referred to as mediators.

In mediation analysis, the main focus is on understanding the causal chain of relationships between variables. It involves three key components:
  • Independent variable (X): The variable that is hypothesized to influence the dependent variable directly or indirectly through one or more mediators.
  • Mediator (M): The variable(s) that mediates the relationship between the independent variable and the dependent variable. It explains how and why the independent variable affects the dependent variable.
  • Dependent variable (Y): The variable that is influenced by the independent variable either directly or indirectly through the mediators.
The analysis aims to estimate the direct effect of the independent variable on the dependent variable and the indirect effect mediated through the mediator(s). Several statistical techniques can be used for mediation analysis, such as regression-based methods (e.g., ordinary least squares regression) or more advanced methods like structural equation modeling.

In our published paper "Contemporary risk scores predict clinicalworsening in pulmonary arterial hypertension - Ananalysis of FREEDOM-EV",  mediation analysis was used to test the hypothesis that improvements in risk score (a surrogate endpoint) contributed to reduced likelihood for clinical worsening (a long-term clinical endpoint). 
 
In a paper by Blette et al, "Is low-risk status a surrogate outcome in pulmonary arterialhypertension? An analysis of three randomised trials ", the mediation analysis was used to investigate surrogacy. The author stated:
"we performed a mediation analysis considering each candidate surrogate as an intermediate outcome. To avoid inconsistent mediation (ie, when direct and indirect effects cancel each other out, the direct effect is even larger than the total effect, or other situations that can result in a negative proportion mediated), we first empirically tested four criteria to justify the mediation analysis. Next, Cox proportional hazards models were fit for the clinical worsening and survival outcomes conditional on each candidate surrogate separately, as well as treatment, corresponding baseline risk score, and a fixed effect variable with three levels for trial membership (to allow for similarity within each trial). Results from these models were combined with parallel models that did not condition on the candidate surrogates, but otherwise conditioned on the same set of variables to perform the difference method for mediation, estimating the total effect and direct effects of treatment on clinical worsening and survival, as well as the indirect effects through each candidate surrogate. The proportion of the effect mediated through each surrogate risk score was estimated, along with 95% CIs via a bootstrap procedure."
In a previous post, the mediation analysis was discussed. "Mediation analysis and SAS CAUSALMED procedure"

Landmark analysis, also known as landmark survival analysis, is a statistical method commonly used in survival analysis to investigate the impact of time-dependent variables on the occurrence of an event of interest. It allows for the assessment of time-varying effects in longitudinal studies or clinical trials where the values of variables may change over time.

In landmark analysis, the follow-up time is divided into predefined intervals or "landmarks," and the analysis is performed separately for each landmark. The key steps in landmark analysis are as follows:

  • Define landmarks: Choose specific time points of interest during the follow-up period.
  • Create landmark cohorts: At each landmark, divide the study population into subgroups based on the status of the time-dependent variable(s) of interest.
  • Analyze survival outcomes: Estimate survival probabilities or hazard rates for each subgroup defined by the landmark cohorts.
  • Compare survival outcomes: Compare the survival outcomes between the different subgroups to assess the impact of the time-dependent variable(s) on the event occurrence.

Landmark analysis allows researchers to capture time-varying effects and observe how the relationship between variables changes over the course of a study. It is particularly useful when analyzing data with time-dependent covariates, treatment interventions, or changes in exposure levels over time.

In a paper by McLaughlin et al "Pulmonary Arterial Hypertension-Related Morbidity Is Prognostic for Mortality", the landmark analysis was used to assess the impact of morbidity events on the risk of subsequent mortality.

In a paper by Eisenstein et al "Clopidogrel use and long-term clinical outcomes after drug-eluting stent implantation" , landmark analyses were performed to explore the association of extended clopidogrel use and long-term clinical outcomes of patients receiving drug eluting stents (DES) and bare-metal stents (BMS) for treatment of coronary artery disease.

The tutorial paper "Landmark Analysis at the 25-Year Landmark Point" by Dr Dafni is a good reference for Landmark analysis. 

Mediation analysis and Landmark analysis differ in their goals, focus, and types of data they analyze:

Goals: Mediation analysis aims to understand the mechanism or process through which an independent variable influences a dependent variable, exploring direct and indirect effects. Landmark analysis, on the other hand, focuses on assessing time-varying effects and understanding how the occurrence of an event is influenced by time-dependent variables.

Focus: Mediation analysis emphasizes identifying mediators that explain the relationship between an independent variable and a dependent variable. Landmark analysis focuses on investigating the impact of time-dependent variables on survival outcomes or event occurrences.


Data: Mediation analysis typically requires cross-sectional or longitudinal data with variables measured at different time points. It is applicable to both continuous and categorical variables. Landmark analysis is commonly used in survival analysis, analyzing time-to-event data, and requires longitudinal data with time-dependent variables.

Both mediation analysis and landmark analysis are valuable statistical tools in different contexts, providing insights into different aspects of data analysis. Here is a table to compare the mediation analysis and the landmark analysis generated by ChatGPT, but I added the last row for implementing the mediation and landmark analyses. 

Aspect

Mediation Analysis

Landmark Analysis

Statistical Method

Investigates relationships and effects between variables

Analyzes time-varying effects and event occurrences

Time Dependency

Considers temporal aspect of data

Accounts for time-varying effects and changing values over time

Causal Inference

Aims to understand causal chain of relationships

Examines impact of time-dependent variables on event outcomes

Focus

Identifying mediators that explain relationships

Assessing time-dependent variables and event occurrences

Variables

Independent, mediator, and dependent variables

Time-dependent variables influencing event occurrences

Data Type

Cross-sectional or longitudinal with measured variables

Longitudinal data with time-dependent variables

Analytical Steps

Estimating direct and indirect effects using regression

Dividing follow-up into landmarks, comparing survival outcomes

Research Questions

Mechanisms and processes of variable influence

Impact of time-dependent variables on events or survival

Implementation




In SAS, Procedure CASUALMED allows you to estimate direct and indirect effects using different mediation models. It supports various regression-based mediation approaches, including Sobel, bootstrapping, and Bayesian estimation.

In R, to conduct mediation analysis, the most commonly used package is "mediation." This package provides a comprehensive set of functions to estimate direct and indirect effects in mediation models. It supports various mediation methods, including the causal steps approach, bootstrapping, and structural equation modeling (SEM).

In SAS, Procedures LIFETEST, PHREG, and LIFEREG can all be used. You can divide the follow-up time into landmark intervals and analyze survival outcomes for different subgroups defined by the landmarks

In R, you can utilize the "survival" package, which is widely used for survival analysis. The "survival" package provides functions to handle time-to-event data, perform survival analysis, and estimate survival probabilities. You can divide the follow-up time into landmarks and analyze survival outcomes for different landmark cohorts.


Personally, I prefer the mediation analysis to the landmark analysis. In the landmark analysis, the subjects who did not reach the landmark timepoint were excluded from the analysis and the analyses are performed on a subset of the overall population - sort of principle stratum. The endpoint measure at the landmark timepoint and whether or not the subjects reach the landmark timepoint itself is meaningful. Excluding it from the analysis is against the intention-to-treatment principle and may cause biases. 

Sunday, August 21, 2022

Mediation analysis and SAS CAUSALMED procedure

In a recent publication (Benza et al "Contemporary Risk Scores Predict Clinical Worsening in Pulmonary Arterial Hypertension - An Analysis of FREEDOM-EV"), we conducted an analysis called 'Mediation analysis'. In the statistical analysis section, the 'mediation analysis' was stated as the following: 

"To determine whether the change in Week 12 REVEAL Lite 2 risk score ‘mediated’ the treatment effect in delaying clinical worsening, we used SAS (v14.3) CAUSALMED procedure which operationalizes the work of Valeri and VanderWeele.
This analysis attempts to determine what fraction of the total treatment effect appears to be attributable to the treatment effect on the REVEAL Lite 2 score. The analysis was adjusted for baseline REVEAL Lite 2 score; we did the analysis both with and without assuming that there is a treatment and mediator (REVEAL Lite 2 score) interaction on the outcome model (clinical worsening). The definition ‘net clinical benefit’ has been previously proposed as the achievement of all three French non-invasive low risk factors without a clinical worsening event; we retrospectively used the present database to model the performance of this definition."
According to Wikipedia, the mediation model and mediation analysis are defined as the following: 
In statistics, a mediation model seeks to identify and explain the mechanism or process that underlies an observed relationship between an independent variable and a dependent variable via the inclusion of a third hypothetical variable, known as a mediator variable (also a mediating variable, intermediary variable, or intervening variable). Rather than a direct causal relationship between the independent variable and the dependent variable, a mediation model proposes that the independent variable influences the mediator variable, which in turn influences the dependent variable. Thus, the mediator variable serves to clarify the nature of the relationship between the independent and dependent variables.

Mediation analyses are employed to understand a known relationship by exploring the underlying mechanism or process by which one variable influences another variable through a mediator variable. In particular, mediation analysis can contribute to better understanding the relationship between an independent variable and a dependent variable when these variables do not have an obvious direct connection.

A mediator variable can either account for all or some of the observed relationship between two variables. 

Full Mediation

Maximum evidence for mediation, also called full mediation, would occur if the inclusion of the mediation variable drops the relationship between the independent variable and dependent variable to zero. In other words, the effect of the independent variable on the dependent variable is all through the mediator variable. 

Partial mediation

Partial mediation maintains that the mediating variable accounts for some, but not all, of the relationship between the independent variable and dependent variable. Partial mediation implies that there is no only a significant relationship between the mediator and the dependent variable, but also some direct relationship between the independent and dependent variable - the line from independent variable to dependent variable is solid and c is not equal to zero. 

 


The mediation analysis has been used in the data analysis for observational data, clinical trial data, survey data, and epidemiology study data. 

In an article by Eyre et al "Effect of Covid-19 Vaccination on Transmission of Alpha and Delta Variants", the mediation analysis was used to assess whether the effect of the vaccination status of the index patient was explained by Ct values at diagnosis.  Ct values are cycle-threshold values (indicative of viral load21) in the index patient.

In an article by Reaven et al "Intensive Glucose Control in Patients with Type 2 Diabetes — 15-Year Follow-up", mediation analyses were performed:

In prespecified mediation analyses, Cox proportional-hazards models were used to examine the effects of the glycated hemoglobin level on the primary cardiovascular disease outcome and on the observed treatment effects. Specifically, the log-linear association of the cumulative glycated hemoglobin level (modeled as a time-varying covariate) with the primary cardiovascular disease outcome was assessed during the period of separation of the glycated hemoglobin curves and after convergence. Models examined the effect of treatment group (intensive therapy or standard therapy) on the primary outcome in an unadjusted analysis (model 1) or while accounting for baseline, most recent, or cumulative mean glycated hemoglobin level (models 2, 3, and 4, respectively).

A paper by Vo et al summarized "the conduct and reporting of mediation analysis in recently published randomized controlled trials: results from a methodological systematic review"

Mediation analysis can be performed using SAS procedure CAUSALMED. CAUSALMED procedure was developed for estimating causal mediation effects from observational data, but can definitely be used for estimating mediation effects from the randomized controlled clinical trial data. Please see the references below:

Mediation analysis can be performed using other software. This is very well summarized in a paper by Valente et al "Causal Mediation Programs in R, Mplus, SAS, SPSS, and Stata".