29
Parmsurv: a SAS Macro for Flexible Parametric Survival Analysis with Long-Term Predictions Han Fu 1* , Shahrul Mt-Isa 2 , Richard Baumgartner 3 , William Malbecq 2 1 Division of Biostatistics, The Ohio State University 2 Biostatistics and Research Decision Sciences (BARDS), MSD 3 BARDS, Merck & Co., Inc. * Author for correspondence: [email protected]

Parmsurv: a SAS Macro for Flexible Parametric Survival

  • Upload
    others

  • View
    16

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Parmsurv: a SAS Macro for Flexible Parametric Survival

Parmsurv: a SAS Macro for Flexible Parametric Survival Analysis with Long-Term Predictions

Han Fu1*, Shahrul Mt-Isa2, Richard Baumgartner3, William Malbecq2

1Division of Biostatistics, The Ohio State University2Biostatistics and Research Decision Sciences (BARDS), MSD

3BARDS, Merck & Co., Inc.

* Author for correspondence: [email protected]

Page 2: Parmsurv: a SAS Macro for Flexible Parametric Survival

Motivation and Background• Health economic evaluations require long-term predictions of survival beyond the follow-up period (e.g. 5 or 10 years)

• Fully parametric survival models• Convenient for long-term predictions• Suitable for non-proportional hazards, in contrast to the Cox model

• Generalized gamma (GG) and generalized F (GF) distributions• Extensive families• Contain well known distributions with various hazard shapes and complexity• Standard proportional hazards (PH) or accelerated failure time (AFT) models are often used• Only the location parameter may depend on covariates

PARAMETRIC SURVIVAL MODELING

Page 3: Parmsurv: a SAS Macro for Flexible Parametric Survival

Existing Software

• PROC LIFEREG in SAS /STAT®: AFT models in the GG family• Does not include the GF model or user-defined distributions• Does not support regression on ancillary parameters

• streg in Stata®: most parametric models with ancillary regression• Does not include the gamma or GF • Does not support censoring types other than right censoring

• flexsurv R package: flexible parametric distributions including custom models• Long-term predictions not directly provided• Stratification or robust inference not supported

PARAMETRIC SURVIVAL MODELING

Page 4: Parmsurv: a SAS Macro for Flexible Parametric Survival

ObjectiveDevelop a SAS macro that allows general parametric survival analysis

• Various distributions

• GG and GF distributions, their special cases including the exponential, Weibull, log normal, log logistic, etc., and Gompertz distribution• Proper custom survival distributions

•Modeling features

• Regression on the location parameter and/or ancillary parameters• Weighted regression, stratified regression and robust inference • Long-term predictions of survival and hazard rates

PARAMETRIC SURVIVAL MODELING

Page 5: Parmsurv: a SAS Macro for Flexible Parametric Survival

Generalized Gamma (GG) Distribution

PARAMETRIC SURVIVAL MODELING

Page 6: Parmsurv: a SAS Macro for Flexible Parametric Survival

4 Types of Hazard Shapes in GG Distribution

PARAMETRIC SURVIVAL MODELING

Page 7: Parmsurv: a SAS Macro for Flexible Parametric Survival

Generalized F (GF) Distribution

PARAMETRIC SURVIVAL MODELING

Page 8: Parmsurv: a SAS Macro for Flexible Parametric Survival

Other Built-in Distributions

PARAMETRIC SURVIVAL MODELING

Page 9: Parmsurv: a SAS Macro for Flexible Parametric Survival

Adjusting for Covariates

PARAMETRIC SURVIVAL MODELING

Page 10: Parmsurv: a SAS Macro for Flexible Parametric Survival

Log-Likelihood Function

PARAMETRIC SURVIVAL MODELING

Page 11: Parmsurv: a SAS Macro for Flexible Parametric Survival

Statistical Inference

PARAMETRIC SURVIVAL MODELING

Page 12: Parmsurv: a SAS Macro for Flexible Parametric Survival

Stratification

PARAMETRIC SURVIVAL MODELING

Page 13: Parmsurv: a SAS Macro for Flexible Parametric Survival

Data Format

PARAMETRIC SURVIVAL MODELING

Data Type Representation

Right censored

Left censored

Interval censored

Event observed

Data Type Representation

Right censored

Event observed

Page 14: Parmsurv: a SAS Macro for Flexible Parametric Survival

Computation

• PROC IML (Matrix language in SAS)

• Estimation: Non-linear programming (NLP) tool in SAS/IML®

• Optimization algorithm can be specified by user, default is Newton-Raphson• Other algorithms include quasi-Newton, trust region, Nelder-Mead, etc.

• Inference:• Approximate derivatives by finite differences: NLPFDD subroutine in SAS/IML®

PARAMETRIC SURVIVAL MODELING

Page 15: Parmsurv: a SAS Macro for Flexible Parametric Survival

SAS Macro ParametersFunctional Area Parameters

Dataset data=

Response t1=, t2=, censor=, censval=0

Covariates covars=, anc=, class_cov=, refgrp=

Distribution dist=

Optimization optim_method=nlpnra, init=, lower = {. . . . . . . . . .}, upper = {. . . . . . . . . .},

Inference alpha=0.05, robust=F

Custom distribution density=, survival=, hazard=, custom_prep=, nanc=, location=beta, param_anc=, param_anc_transf=, log_transf_index=, log_density=, log_survival=

Prediction pred=, pred_max_time=, pred_plot_cl=T

Others weight=, strata=, noprint=F

PARAMETRIC SURVIVAL MODELING

Page 16: Parmsurv: a SAS Macro for Flexible Parametric Survival

Primary Features of the Macro• Estimation and inference of parameters from built-in or custom distributions• Using data with different format and different censoring types• Allowing continuous/categorical covariates associated with primary / ancillary parameters, with / without case weights, with / without stratification• Using different optimization method, providing automatic initial values for optimization• Using regular / robust estimator for standard errors• Prediction in survival and hazard for certain covariates and time• Predicted survival and hazard curves for different covariates and/or stratified variables (with / without confidence bands)

PARAMETRIC SURVIVAL MODELING

Page 17: Parmsurv: a SAS Macro for Flexible Parametric Survival

Simulation Settings

PARAMETRIC SURVIVAL MODELING

Page 18: Parmsurv: a SAS Macro for Flexible Parametric Survival

Example 1: Fitting Standard Models

PARAMETRIC SURVIVAL MODELING

Fit an exponential model%paramsurv(data=data, t1=time, censor=delta, covars= age sex, dist=exp)

Page 19: Parmsurv: a SAS Macro for Flexible Parametric Survival

Fitting Results: Weibull

PARAMETRIC SURVIVAL MODELING

Fit a Weibull model%paramsurv(data=data, t1=time, censor=delta, covars= age sex, dist=Weibull)

Page 20: Parmsurv: a SAS Macro for Flexible Parametric Survival

Model Comparison

PARAMETRIC SURVIVAL MODELING

Distribution Log-likelihood AIC BIC

Exponential -57.656 121.312 129.128

Weibull -56.043 120.086 130.507

Gamma -56.204 120.408 130.829

Log normal -60.688 129.375 139.796

Gompertz -57.249 122.499 132.920

Log logistic -58.903 125.806 136.227

Generalized Gamma -55.998 121.996 135.022

Generalized F -55.998 123.997 139.628

Page 21: Parmsurv: a SAS Macro for Flexible Parametric Survival

Example 2: Covariates on Ancillary Parameters

PARAMETRIC SURVIVAL MODELING

Page 22: Parmsurv: a SAS Macro for Flexible Parametric Survival

Fitting Results

PARAMETRIC SURVIVAL MODELING

Page 23: Parmsurv: a SAS Macro for Flexible Parametric Survival

Example 3: Custom Distribution

PARAMETRIC SURVIVAL MODELING

Page 24: Parmsurv: a SAS Macro for Flexible Parametric Survival

Fitting Results

PARAMETRIC SURVIVAL MODELING

Page 25: Parmsurv: a SAS Macro for Flexible Parametric Survival

Example 4: Prediction%paramsurv(data=data, t1=time, censor=delta, covars=age sex, dist=gengamma,

init={0 -0.5 1 0.5 0.5}, pred=pred, pred_max_time=5)

PARAMETRIC SURVIVAL MODELING

Page 26: Parmsurv: a SAS Macro for Flexible Parametric Survival

Prediction

PARAMETRIC SURVIVAL MODELING

Observations in the preddataset for prediction

Predicted survival and hazard (and S.E.) for specific covariates and time points

Page 27: Parmsurv: a SAS Macro for Flexible Parametric Survival

PARAMETRIC SURVIVAL MODELING

Predicted Survival & Hazard Curves

Page 28: Parmsurv: a SAS Macro for Flexible Parametric Survival

Summary

Developed a SAS macro for general parametric survival analysis

• Allows parametric distributions of arbitrary complexity

• Accommodates fixed continuous / classification covariates

• Supports covariates associated with primary / ancillary parameters

• Allows case weights, stratification and robust inference

• Supports long-term predictions of survival and hazard rates

PARAMETRIC SURVIVAL MODELING

Page 29: Parmsurv: a SAS Macro for Flexible Parametric Survival

References• Cox, Christopher, et al. "Parametric survival analysis and taxonomy of hazard functions for the generalized gamma distribution." Statistics in medicine 26.23 (2007): 4352-4374.

• Cox, Christopher. "The generalized F distribution: an umbrella for parametric survival analysis." Statistics in medicine 27.21 (2008): 4301-4312.

• Jackson, Christopher H. "flexsurv: a platform for parametric survival modeling in R." Journal of statistical software 70 (2016).

• Lin, Danyu Y., and Lee-Jen Wei. "The robust inference for the Cox proportional hazards model." Journal of the American statistical Association 84.408 (1989): 1074-1078.

• Xu, Rengyi, Devan V. Mehrotra, and Pamela A. Shaw. "Hazard ratio inference in stratified clinical trials with time-to-event endpoints and limited sample size." Pharmaceutical statistics 18.3 (2019): 366-376.

PARAMETRIC SURVIVAL MODELING