Анализ выживаемости sas/stat
DESCRIPTION
Анализ выживаемости SAS/STAT. АНАЛИЗ ВЫЖИВАЕМОСТИ. Что такое Анализ Выживаемости и для решения каких задач его стоит применять Математические основы метода Какие инструменты Анализа Выживаемости вы можете найти в SAS/STAT Примеры, примеры, примеры. Исторический обзор. - PowerPoint PPT PresentationTRANSCRIPT
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
АНАЛИЗ ВЫЖИВАЕМОСТИ SAS/STAT
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
АНАЛИЗ
ВЫЖИВАЕМОСТИ
Что такое Анализ Выживаемости и для решения каких задач его стоит
применять
Математические основыметода
Какие инструментыАнализа Выживаемости выможете найти в
SAS/STAT
, , ... Примеры примеры примеры
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
Анализ выживаемости – набор статистических методов для предсказания какфакта , наступления события так и времени до
него
ИСТОРИЧЕСКИЙ ОБЗОР
Появился (около века назад lifetime tables)
- Новый импульс Cox (proportional hazards model) вжурнале JRSSB-1972: на
сегодняшний день - самая цитируемая статья по статистике в истории
Главным образом применялся в клинических исследованиях и
производственном контроле
С большой скоростьюнабирает популярность в телекоме и
кредитном скоринге
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
CRM
СФЕРЫ ПРИМЕНЕНИЯ
Оценка эффективности маркетинговых
кампаний
Кредитныйскоринг
Определение ключевых факторов
риска
Анализ выживаемости
Планирование маркетинговых
кампаний
Медицина
Predictive Maintenance
Предсказаниеоттока
T
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
АНАЛИЗ ВЫЖИВАЕМОСТИ VS ТРАДИЦИОННЫЙ DATA MINING
Модели точнее ифункциональнее
Анализ выживаемости
В чем отличие от традиционных методов
Data Mining?
Используется информация обо
всех объектах
Наблюдения с неизвестным исходом
не отбрасываются
Помимо самих факторов, включаем в модель и их прогнозы
(курсы валют, динамика поведения)
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
1) Крупныйчастный латиноамериканскийбанк
Система управления рисками
Получение информации о динамике покупательной способности клиентов во
времени
2) NHS Blood and Transplant Более эффективное использование скудной
и ценной информации о выживаемости клиентов после пересадки органов
Аккуратный подбор донора и реципиента продлевает срокжизни клиентов и
существенно улучшает её качество
APPLICATIONS & RESEARCH
SAS НЕЗАВИСИМЫЕЭКСПЕРТЫ
1) Jonathan CrookProfessor of Business Economics & Director, MSc Banking & Risk,Edinburgh
2) Christophe MuesSenior Lecturer of Southampton Management School,Southampton
3) ..... , имногие многие другие активно исследуют
примененииАнализа Выживаемости в кредитном
скоринге и CRM
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
ОСНОВНЫЕ ОПРЕДЕЛЕНИЯ
Событие: , « »некий триггер сработавший на клиенте
Цензурирование: выбывание из наблюдаемой выборки под действием стороннихфакторов , , переезд в другой город окончание эксперимента до наступления событиясмерть
Ковариаты: « », « »характеристики клиента влияющие на его отток , , , возраст пол город атакже динамика дохода, динамика , ...курсов валют
tTPtS
)|(lim
0
tTtTtPth
tSdttdS
th
dxxhtSt
0
exp ФУНКЦИЯВЫЖИВАЕМО
СТИ
ФУНКЦИЯРИСКА
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
ФУНКЦИЯ ВЫЖИВАЕМОСТИ
tTPtS
t
dxxhtS0
exp
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
ЦЕНЗУРИРОВАНИЕ
Началонаблюдени
й
Конецнаблюдени
й
А что случится с
? ними
Этого никто не
знает
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
EXPLORATORY DATA ANALYSIS USING SURVIVAL CURVES
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
KAPLAN-MEIER MODEL
tt j
j
jn
dtS 1ˆ
Количество выбывших в интервал времени T
(number at death)
Количество под угрозой выбывания (number at risk)
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
KAPLAN-MEIER MODEL : COMPARING SURVIVAL CURVES
Different Statistical Tests
- Log Rank- Wilcoxon- Likelihood-Ratio
Confidence Limits
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
KAPLAN-MEIER MODEL : DIFFERENT STATISTICAL TESTS
Log Rank
Wilcoxon
Likelihood-Ratio(parametric)
Distribution of Event times Exponential
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
PROC LIFETEST
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
PROC LIFETEST: COMPARING SURVIVAL CURVES
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
Are Hazard Functions proportional? Does Likelihood-Ratio test applicable?
PROC LIFETEST: COMPARING SURVIVAL CURVES
YES NO
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
PROC LIFETEST: COMPARING MULTIPLE SURVIVAL CURVES
proc lifetest data=sasuser.methadone plots=(survival(cb=hw)) notable; time time*status(0); strata dose(50 70) / test=logrank adjust=scheffe nodetail;run;
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
PROC LIFETEST: COMPARING MULTIPLE SURVIVAL CURVES
Dose < 50 and Dose =60 differ? NO Dose > 70 and Dose =60 differ? YES Dose > 70 and Dose <50 differ? YES
proc lifetest data=sasuser.methadone plots=(survival(cb=hw)) notable; time time*status(0); strata dose(50 70) / test=logrank adjust=scheffe nodetail;run;
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
ALTERNATIVE TO KAPLAN-MEIER: LIFE TABLE METHODS
LARGE SAMPLES
LIFE TABLE
the same as Kaplan-Meier Estimate, but …
GROUP OBSERVATIONS
INTO BINS
CENSORED OBS ARE CENSORED IN
THE MIDDLE OF INTERVAL
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
ALTERNATIVE TO KAPLAN-MEIER: LIFE TABLE METHODS
proc lifetest data=sasuser.methadone plots=(survival(failure) hazard) method=life intervals=183 365 548; time time*status(0); strata clinic / test=(all) nodetail;run;
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
COX’S PROPORTIONAL HAZARDS MODEL
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
SURVIVAL MODELS
Models in Survival Analysis are written in terms of Hazard Functions
They assess the relationship of covariates to survival times
Models can be parametric or semi-parametric
SEMI-PARAMETRICPROC PHREG
PARAMETRICPROC LIFEREG
1. Distribution of Event Times is specified
2. Hazard function is completely specified (except for params)
1. Distribution of Event Times is unknown
2. Hazard function is unspecified
Cox Proportional Hazards Model
OK for !
Exp HazardsWeibull Hazards
Usually a poor choice!
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
COX PROPORTIONAL HAZARDS MODEL
1. The model provides the primary information desired from a survival analysis
2. Minimum of assumptions
3. Robust regression estimates of the influence of covariates
4. Thus, the model is extremely popular
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
PROPORTIONAL HAZARDS ASSUMPTION
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
DERIVING COEFFICIENTS: PARTIAL LIKELIHOOD MAXIMIZATION
ILLUSTRATION
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
DERIVING COEFFICIENTS: PARTIAL LIKELIHOOD MAXIMIZATION
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
TIED OBSERVATIONS
Tied observations
They must be taken into account in Partial Likelihood
calculation!
SAS/STAT PROC PHREGdoes it automatically!
(Breslow approximation)
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
PROC PHREG
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
PROC PHREG: FIT COX REGRESSION MODEL TO METHADONE DATA
COEFFICIENTESTIMATE
COEFFICIENT not equal to 0?
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
iiXetSXtS
)(),( 0
PROC PHREG: ADJUST SURVIVAL CURVES
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
COX PH MODEL ASSESSMENT
COX MODEL ASSUMPTIONS
1. Proportional HazardsThe effect of the predictor is the same over all values of time
2. LinearityLog Hazard linearly depends on predictors
3. AdditivityThe joint effect of predictors equals the sum of their separate effects
TIME-VARIABLE DEPENDENCE
CUMULATIVE RESIDUALS PLOT
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
ASSESS PH USING TIME-VARIABLE DEPENDENCE
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
ASSESS PH USING CUMULATIVE RESIDUALS PLOT
RESIDUAL
Simulated
Observed
t
tttt
i
iiobstCR
0
exp
SIMULATE IT!
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
MODELS WITH NON-PROPORTIONAL HAZARDS
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
MODELING NON-PROPORTIONAL HAZARDS
WAYS to HANDLE NON-PROPORTIONAL HAZARDS
1. Stratified Cox PHVary Baseline hazard
2. Cox PH with time-dependent varsModel non-proportionality using interactions with functions of time
3. Piecewise Cox PHThe effect of variable is assessed separately for different times
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
STRATIFIED COX MODEL
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
STRATIFIED COX MODEL
1. Dose*Clinic & Clinic*Prison
2. Clinic*Prison
DROP Dose*Clinic
DROP Clinic*Prison
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
STRATIFIED COX MODEL
3. No interactions
STAY at this model complexity
4. Try to adjust Baseline Hazard by Clinic
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
MODELS WITH INTERACTIONS WITH TIME
Change the effect β of the variable
2 WAYS of INTRODUCING TIME INTO PARAMETER ESTIMATES
Change the variableitself
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
MODELS WITH INTERACTIONS WITH TIME
KEEP
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
PIECEWISE COX MODEL
CREATE INTERACTION with HEAVISIDE FUNCTION!
lower
upperlower
lower
tt
ttt
tt
tH
,0
,,1
,,0
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
PIECEWISE COX MODEL
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
ADVANCED TOPICS
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
TIME-DEPENDENT COVARIATES
New time-dependent covariates must be specified inside PROC PHREG
proc phreg data=sasuser.methadone; class Clinic (param=ref ref='2'); model Time*Status(0)=Clinic Dose Prison Drink / ties=exact rl=pl; Drink=(0 <= DrinkStart < Time);run;
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
MODELING THE EFFECT OF TIME-DEPENDENT PREDICTORS
«Drink» is time dependent and it’s important!
Coefficients are the same for the whole survey period
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
REPEATED EVENTS
Some events are intrinsically repeatable: pregnancy, infection
One should account for this in survival analysis
Copy r ight © 2013, SAS Ins t i tu te Inc . A l l r ights reserved.
1.
2.
3. Drop
4. Drop
REPEATED EVENTS: DIFFERENT MODELS FOR SUCC EVENTS
Build different survival models for successive events
Model men’s muscle soreness in 4 intervals depending on age and treatment