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:
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
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
SAS to the rescue Exploratory – FREQ – UNIVARIATE – MEANS/SUMMARY – GPLOT Time-to-event most commonly analysed using – LIFETEST – PHREG
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?
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
The Usual Suspects Previous preterm delivery Multiples < 6 mos since last preg Surgery on cervix IVF Uterine abnormalities Smoking
A Long Line-Up Chorioamnionitis Weight Gain UTI BP (G)DM Maternal Weight Previous Loss Antepartum Trauma A/P Bleeding Polyhydramnios
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;
The LIFETEST Procedure Stratum 4: # of Foetuses = Twins Product-Limit Survival Estimates GA_BEST SurvivalFailure Survival Standard Error Number Failed Number Left LABOUR 32.0000 0.90750.09250.003247437111S 33.0000 0.88370.11630.003599276819S 34.0000 0.84650.15350.0040712106383S 35.0000 0.78840.21160.0046616385761S 36.0000 0.71190.28810.0052521764918S 37.0000 0.61540.38460.0058227843717S 38.0000 0.48640.51360.0065134172145S 39.0000 0.35500.64500.007453821861S 40.0000 0.21250.78750.008374076325S 41.0000 0.09990.90010.00868418676S 42.0000 0.05430.94570.00859421022S 43.1430 0.03390.96610.0097942146S
More Babies Arrive Sooner - Duh Test of Equality over Strata TestChi-SquareDF Pr > Chi-Square Log-Rank12814.44693<.0001 Wilcoxon17518.29743<.0001 -2Log(LR)184.41723<.0001
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-512.121.2544580.5<.0001 # Previous Preterm Deliveries Overweight1074.158.7622334.1<.0001 ADMITSMK-18207.71727.7111.1<.0001 # Cigarettes / Day @ Admission Rank Tests for the Association of GA_BEST with Covariates Pooled over Strata
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
But what about the question? Analysis of Maximum Likelihood Estimates ParameterDF Parameter Estimate Standard Error Chi- Square Pr > ChiSq Hazard Ratio Label PREV_PTD10.474990.03067239.8634<.00011.608 # Previous Preterm Deliveries DLNUMFET11.436230.05435698.4233<.00014.205# of Foetuses ADMITSMK10.003680.000548445.1439<.00011.004 # Cigarettes / Day @ Admission
Assume makes an ass of u and me Chorioamnionitis1-0.056110.124100.20440.65120.945 Gest_HT1-0.887390.1301046.5222<.00010.412Gestational Hypertension PrexHT1-0.346410.1013311.68690.00060.707 Pre-existing Hypertension Pre_Existing_Diabete1-0.033880.118210.08210.77440.967Pre-existing Diabetes GDM1-0.088090.046983.51620.06080.916Gestational Diabetes DLABORTS1-0.00024500.012650.00040.98451.000 # of Pregnancies, Excl. the Present, with Non- viable Foetus
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
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
One last tidbit %CIF macro http://support.sas.com/kb/45/addl/fusion_45997_13_fusion_45997_12_cif.txt 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
Questions? SHRUG.President@gmail.com Ron.Dewar@HowDidIGetInvolved?ca http://www.ats.ucla.edu/stat/examples/asa/test_proportionality.htm http://www4.stat.ncsu.edu/~lu/ST790/homework/Biometrika-1993-LIN-557-72.pdf http://escarela.com/archivo/anahuac/03o/residuals.pdf SAS is a registered trademark or trademark of SAS Institute Inc. in Canada, the USA and other countries with dysfunctional political institutions.
Your consent to our cookies if you continue to use this website.