Анализ выживаемости

advertisement
АНАЛИЗ ВЫЖИВАЕМОСТИ
SAS/STAT
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
 Что такое Анализ Выживаемости и для решения
каких задач его стоит применять
АНАЛИЗ
ВЫЖИВАЕМОСТИ
 Математические основы метода
 Какие инструменты Анализа Выживаемости вы
можете найти в SAS/STAT
 Примеры, примеры, примеры...
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
ИСТОРИЧЕСКИЙ ОБЗОР
Анализ выживаемости – набор статистических методов для предсказания
как факта наступления события, так и времени до него
 Появился около века назад (lifetime tables)
 Новый импульс - Cox (proportional hazards
model) в журнале JRSSB-1972: на сегодняшний
день - самая цитируемая статья по статистике
в истории
 Главным образом применялся в клинических
исследованиях и производственном контроле
 С большой скоростью набирает популярность
в телекоме и кредитном скоринге
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
СФЕРЫ ПРИМЕНЕНИЯ
Предсказание оттока
CRM
Анализ выживаемости
Кредитный скоринг
Планирование
маркетинговых
кампаний
Predictive Maintenance
Медицина
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
Оценка
эффективности
маркетинговых
кампаний
T=?
Определение
ключевых факторов
риска
АНАЛИЗ ВЫЖИВАЕМОСТИ VS ТРАДИЦИОННЫЙ DATA MINING
Анализ выживаемости
Наблюдения с
неизвестным исходом
не отбрасываются
Используется
информация обо всех
объектах
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
В чем отличие от
традиционных методов
Data Mining?
Помимо самих
факторов, включаем в
модель и их прогнозы
(курсы валют,
динамика поведения)
Модели точнее и
функциональнее
APPLICATIONS & RESEARCH
SAS
1) Крупный частный латиноамериканский банк
Система управления рисками
Получение информации о динамике
покупательной способности клиентов во
времени
2) NHS Blood and Transplant
Более эффективное использование скудной и
ценной информации о выживаемости клиентов
после пересадки органов
Аккуратный подбор донора и реципиента
продлевает срок жизни клиентов и
существенно улучшает её качество
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
НЕЗАВИСИМЫЕ ЭКСПЕРТЫ
1) Jonathan Crook
Professor of Business Economics &
Director, MSc Banking & Risk,
Edinburgh
2) Christophe Mues
Senior Lecturer of Southampton
Management School,
Southampton
3) .....и многие, многие другие
активно исследуют применении
Анализа Выживаемости в
кредитном скоринге и CRM
ОСНОВНЫЕ ОПРЕДЕЛЕНИЯ
Событие: некий триггер, сработавший на «клиенте»
Цензурирование: выбывание из наблюдаемой выборки под действием сторонних факторов
 переезд в другой город, окончание эксперимента до наступления события, смерть
Ковариаты: характеристики «клиента», влияющие на его «отток»
 возраст, пол, город, а также динамика дохода, динамика курсов валют, ...
ФУНКЦИЯ
ВЫЖИВАЕМОСТИ
ФУНКЦИЯ РИСКА
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
S t   PT  t 
P(t  T  t   | T  t )
 0

ht   lim
 t

S t   exp   h x dx 
 0

dS t 
ht    dt
S t 
ФУНКЦИЯ ВЫЖИВАЕМОСТИ
S t   PT  t 
 t


S t   exp   h x dx 
 0

C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
ЦЕНЗУРИРОВАНИЕ
Конец
наблюдений
А что случится
с ними?
Начало
наблюдений
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
Этого никто
не знает
EXPLORATORY DATA ANALYSIS USING
SURVIVAL CURVES
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
KAPLAN-MEIER MODEL
 dj
ˆ
S t    1 
 n
t j t 
j
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .




Количество выбывших в
интервал времени T
(number at death)
Количество под угрозой
выбывания (number at risk)
KAPLAN-MEIER MODEL : COMPARING SURVIVAL CURVES
Confidence Limits
Different Statistical Tests
-
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
Log Rank
Wilcoxon
Likelihood-Ratio
KAPLAN-MEIER MODEL : DIFFERENT STATISTICAL TESTS
Log Rank
Wilcoxon
Likelihood-Ratio
(parametric)
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
Distribution of Event
times  Exponential
PROC LIFETEST
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
PROC LIFETEST: COMPARING SURVIVAL CURVES
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
PROC LIFETEST: COMPARING SURVIVAL CURVES
Are Hazard Functions proportional?
YES
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
Does Likelihood-Ratio test applicable?
NO
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;
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
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;
Dose < 50 and Dose =60 differ?  NO
Dose > 70 and Dose =60 differ?  YES
Dose > 70 and Dose <50 differ?  YES
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
ALTERNATIVE TO KAPLAN-MEIER: LIFE TABLE METHODS
LIFE TABLE
the same as KaplanMeier Estimate, but …
LARGE SAMPLES
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
GROUP
OBSERVATIONS
INTO BINS
CENSORED OBS
ARE CENSORED IN
THE MIDDLE OF
INTERVAL
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;
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
COX’S PROPORTIONAL HAZARDS MODEL
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
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
PARAMETRIC
PROC LIFEREG
SEMI-PARAMETRIC
PROC PHREG
1.
Distribution of Event
Times is specified
1.
Distribution of
Event Times is
unknown
2.
Hazard function is
completely specified
(except for params)
2.
Hazard function is
unspecified
Exp Hazards
Weibull Hazards
Usually a poor
choice!
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
Cox Proportional
Hazards Model
OK for !
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
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
PROPORTIONAL HAZARDS ASSUMPTION
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
DERIVING COEFFICIENTS: PARTIAL LIKELIHOOD MAXIMIZATION
ILLUSTRATION
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
DERIVING COEFFICIENTS: PARTIAL LIKELIHOOD MAXIMIZATION
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
TIED OBSERVATIONS
Tied observations
They must be taken into
account in Partial Likelihood
calculation!
SAS/STAT PROC PHREG
does it automatically!
(Breslow approximation)
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
PROC PHREG
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
PROC PHREG: FIT COX REGRESSION MODEL TO METHADONE DATA
COEFFICIENT
ESTIMATE
COEFFICIENT not
equal to 0?
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
PROC PHREG: ADJUST SURVIVAL CURVES
S (t , X )  S 0 (t )e 
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
i X i
COX PH MODEL ASSESSMENT
COX MODEL ASSUMPTIONS
1. Proportional Hazards
The effect of the predictor is the
same over all values of time
2. Linearity
Log Hazard linearly depends on
predictors
3. Additivity
The joint effect of predictors equals
the sum of their separate effects
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
TIME-VARIABLE
DEPENDENCE
CUMULATIVE RESIDUALS
PLOT
ASSESS PH USING TIME-VARIABLE DEPENDENCE
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
ASSESS PH USING CUMULATIVE RESIDUALS PLOT
RESIDUAL
Simulated
Observed
t
CR t    obsti  expti
ti t 0
SIMULATE IT!
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
MODELS WITH NON-PROPORTIONAL HAZARDS
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
MODELING NON-PROPORTIONAL HAZARDS
WAYS to HANDLE NONPROPORTIONAL HAZARDS
1. Stratified Cox PH
Vary Baseline hazard
2. Cox PH with time-dependent vars
Model non-proportionality using
interactions with functions of time
3. Piecewise Cox PH
The effect of variable is assessed
separately for different times
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
STRATIFIED COX MODEL
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
STRATIFIED COX MODEL
1. Dose*Clinic & Clinic*Prison
DROP Dose*Clinic
2. Clinic*Prison
DROP Clinic*Prison
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
STRATIFIED COX MODEL
3. No interactions
STAY at this model
complexity
4. Try to adjust Baseline
Hazard by Clinic
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
MODELS WITH INTERACTIONS WITH TIME
2 WAYS of INTRODUCING TIME INTO
PARAMETER ESTIMATES
Change the effect β
of the variable
Change the variable
itself
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
MODELS WITH INTERACTIONS WITH TIME
KEEP
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
PIECEWISE COX MODEL
CREATE INTERACTION with
HEAVISIDE FUNCTION!
 0, t  tlower ,



H t   1, tlower  t  tupper , 


 0, t  tlower

C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
PIECEWISE COX MODEL
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
ADVANCED TOPICS
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
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;
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
MODELING THE EFFECT OF TIME-DEPENDENT PREDICTORS
Coefficients are the same for
the whole survey period
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
«Drink» is time dependent
and it’s important!
REPEATED EVENTS
Some events are intrinsically repeatable: pregnancy, infection
 One should account for this in survival analysis
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
REPEATED EVENTS: DIFFERENT MODELS FOR SUCC EVENTS
Model men’s muscle soreness in 4
intervals depending on age and treatment
1.
2.
Build different
survival models for
successive events
C op yr i g h t © 2 0 1 3 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
3.
Drop
4.
Drop
Download