Presentation is loading. Please wait.

Presentation is loading. Please wait.

Survival Models in SAS Learning Objectives What type of data merits these? What tools does SAS have? How do I do descriptive analysis? How do I do modelling?

Similar presentations


Presentation on theme: "Survival Models in SAS Learning Objectives What type of data merits these? What tools does SAS have? How do I do descriptive analysis? How do I do modelling?"— Presentation transcript:

1 Survival Models in SAS Learning Objectives What type of data merits these? What tools does SAS have? How do I do descriptive analysis? How do I do modelling? Is the model appropriate? A.Pope - Essay on Criticism Part ii Line 15

2 My Data Stops in the Middle Outcome is typically a time duration until an event Outcome is not observed for some proportion of the population Often the outcome is death of a patient – Other examples Failure of an electronic component Divorce Change cell phone provider

3 SAS to the rescue Exploratory – FREQ – UNIVARIATE – MEANS/SUMMARY – GPLOT Time-to-event most commonly analysed using – LIFETEST – PHREG

4 Baby’s First Dataset NSAPD: Mum’s and babes since 1980 All NS births since 1988 Comprehensive clinical and demographic data Includes gestational age at birth/delivery Spontaneous / Induced / No Labour Question: What factors associated with premature birth?

5 How is this ‘time-to-event’? Birth is the event When birth would have happened is censored – Induced labour – Straight to Caesarean Section Measured in weeks since LMP A (large) set of known risk factors Many captured in Atlee

6 The Usual Suspects Previous preterm delivery Multiples < 6 mos since last preg Surgery on cervix IVF Uterine abnormalities Smoking

7 A Long Line-Up Chorioamnionitis Weight Gain UTI BP (G)DM Maternal Weight Previous Loss Antepartum Trauma A/P Bleeding Polyhydramnios

8 This LIFE is a TEST This life is a test-it is only a test. If it had been an actual life, you would have received further instructions on where to go and what to do. Remember, this life is only a test. proc lifetest data = Work.ForSHRUG plots = (s,ls,lls) maxtime = 45; time GA_Best * Spontaneous_Labour ( 0 ); id Labour /* censoring = Induced / None */; strata DLNumFet; test Prev_PTD Overweight AdmitSmk; /* latter two most interesting from population health perspective */ run;

9 The LIFETEST Procedure Stratum 4: # of Foetuses = Twins Product-Limit Survival Estimates GA_BEST SurvivalFailure Survival Standard Error Number Failed Number Left LABOUR S S S S S S S S S S S S

10 More Babies Arrive Sooner - Duh Test of Equality over Strata TestChi-SquareDF Pr > Chi-Square Log-Rank <.0001 Wilcoxon < Log(LR) <.0001

11 Lots of Data = Tiny p-values Univariate Chi-Squares for the Wilcoxon Test Variable Test Statistic Standard Error Chi-Square Pr > Chi-Square Label PREV_PTD <.0001 # Previous Preterm Deliveries Overweight <.0001 ADMITSMK <.0001 # Cigarettes / Admission Rank Tests for the Association of GA_BEST with Covariates Pooled over Strata

12 Apply the “C” test

13 Make the punishment fit the crime

14 Smoking and weight matter … how much? Hazards – not just for golf any more Proportional Hazards REGression Doesn’t assume functional form for baseline hazard Does assume that effect of covariate proportional over time Manifests itself as, e.g., parallel lines on plot

15 Deciphering the code proc phreg data = Work.ForSHRUG plots ( overlay timerange = 24, 44 )= ( cumhaz survival ) /* interesting weeks */ simple/* compare healthy/unhealthy */; where Weighted_Ran > 0.9; /* 10% of 'healthy' + 55% w/ 1 risk factor + */

16 Modelling – not just for the young and beautiful ! model GA_Best * Spontaneous_Labour ( 0 ) = Prev_PTD DLNumFet AdmitSmk Chorioamnionitis Gest_HT PrexHT Pre_Existing_Diabetes GDM DLAborts Overweight Underweight ; assess var = ( Prev_PTD DLNumFet AdmitSmk Chorioamnionitis Gest_HT PrexHT GDM DLAborts Pre_Existing_Diabetes Overweight Underweight ) ph;/* / resample seed = 19 */ /* takes 8 hours to run! */

17 Odious? NO – ODS – Yes! ODS GRAPHICS ON; ODS GRAPHICS OFF;

18 What about plurality?

19 Transformational Experience

20 On the other hand …

21 But what about the question? Analysis of Maximum Likelihood Estimates ParameterDF Parameter Estimate Standard Error Chi- Square Pr > ChiSq Hazard Ratio Label PREV_PTD < # Previous Preterm Deliveries DLNUMFET < # of Foetuses ADMITSMK < # Cigarettes / Admission

22 Assume makes an ass of u and me Chorioamnionitis Gest_HT < Gestational Hypertension PrexHT Pre-existing Hypertension Pre_Existing_Diabete Pre-existing Diabetes GDM Gestational Diabetes DLABORTS # of Pregnancies, Excl. the Present, with Non- viable Foetus

23 Criticism A little learning is a dangerous thing; Drink deep, or taste not the Pierian spring: There shallow draughts intoxicate the brain, And drinking largely sobers us again. Two of 372 rhyming couplets

24 Competing Risks Censoring must be non-informative Here some covariates are associated with – Induction – No Labour – Need different models Look at cumulative probability of 3 outcomes

25 One last tidbit %CIF macro Crude cumulative incidence function No covariates Endpoints (time to spontaneous labour, e.g.) subject to competing risks – Induction for reason associated with length of pregnancy – No Labour for … Comes with confidence limits Needs Base & IML ( in 9.2 also GRAPH ) No recommendation

26 Questions? SAS is a registered trademark or trademark of SAS Institute Inc. in Canada, the USA and other countries with dysfunctional political institutions.


Download ppt "Survival Models in SAS Learning Objectives What type of data merits these? What tools does SAS have? How do I do descriptive analysis? How do I do modelling?"

Similar presentations


Ads by Google