Related Experiment Video
Updated: Oct 23, 2025

Inverse Probability of Treatment Weighting Propensity Score using the Military Health System Data Repository and National Death Index
Published on: January 8, 2020
A SAS macro for estimating direct adjusted survival functions for time-to-event data with or without left truncation
Zhen-Huan Hu1, Hai-Lin Wang2, Robert Peter Gale3
1Medical College of Wisconsin, Milwaukee, WI, USA. novelkeny@gmail.com.
Abstract:
There are several statistical programmes to compute direct adjusted survival estimates from results of the Cox proportional hazards model. However, when used to analyze observational databases with large sample sizes or highly stratified treatment groups such as in registry-related datasets, these programmes are inefficient or unable to generate confidence bands and simultaneous p values. Also, these programmes do not consider potential left-truncation in retrospectively collected data. To address these deficiencies we developed a new SAS macro %adjsurvlt() able to produce direct adjusted survival estimates based on a stratified Cox model. The macro has improved computational performance and is able to handle left-truncated and right-censored time-to-event data. Several mechanisms were implemented to improve computational efficiency including choosing matrix operations over do-loops and reducing dimensions of co-variate matrices. Compared to the latest SAS macro, %adjsurvlt() used < 0.1% computational time to process a dataset with 100 treatment cohorts and a sample size of 20,000 and showed similar computational efficiency when analyzing left-truncated and right-censored data. We illustrate use of %adjsurvlt() to compare retrospectively collected survival data of 2 transplant cohorts.
Related Concept Videos
Truncation in Survival Analysis
Left truncation occurs when individuals who experienced the event of interest before a certain time are not included in the study. This is often due to a "delayed entry" into the study where only those who survive until a certain entry point are...
Introduction To Survival Analysis
The primary goal of survival analysis is to estimate survival time—the time...
Kaplan-Meier Approach
Assumptions of Survival Analysis
Comparing the Survival Analysis of Two or More Groups
Survival Tree
Building a Survival Tree
Constructing a...

