Anda di halaman 1dari 13

TUGAS ANALISIS SURVIVAL

Application of Stratified Cox Model to Remission Survival Data (R Software)

Oleh :

Milasari (06211650010013)

Dosen :

Santi Wulan Purnami, M.Si, Ph.D

Dr. rer pol. Dedy Dwi Prastyo, S.Si, M.Si

PROGRAM STUDI S2
JURUSAN STATISTIKA
INSTITUT TEKNOLOGI SEPULUH NOPEMBER
SURABAYA
2017
Terdapat data 42 pasien leukemia, separuh di antaranya menerima new
treatment dan setengahnya menerima standard treatment. Exposure variabel yang
digunakan adalah treatment (Rx), dan dua variabel lain untuk kontrol adalah untuk
log WBC dan jenis kelamin. Tujuan dari analisis ini adalah untuk memeriksa
asumsi PH menggunakan model cox, dan melakukan perbandingan dengan
stratified cox procedure.

Tabel 1. Data Pasien Leukemia


Subject Survt Relapse Sex logWBC Rx
1 35 1 1 1.45 0
2 34 1 1 1.47 0
3 32 1 1 2.2 0
4 32 1 1 2.53 0
5 25 1 1 1.78 0
6 23 2 1 2.57 0
7 22 2 1 2.32 0
8 20 1 1 2.01 0
9 19 1 0 2.05 0
10 17 1 0 2.16 0
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
40 2 2 1 4.48 1
41 1 2 1 2.8 1
42 1 2 1 5 1

Log Rank Test digunakan untuk menguji apakah kurva survival dua populasi
berbeda atau tidak. Jika populasi kurva survival berbeda secara signifikan, dapat
disimpulkan bahwa proporsi individu yang bertahan dalam kelompok perlakuan
berbeda dari proporsi individu yang bertahan dalam kelompok lainnya.

Syntax in R
library(splines)
library(survival)
attach(addict)
summary(Rx)
log_rank=survdiff(Surv(addict$Survt,addict$Relapse)~addict$Rx,rho=
1)
log_rank
Output:
Call:

survdiff(formula = Surv(addict$Survt, addict$Relapse) ~ addict$Rx,


rho = 1)

N Observed Expected (O-E)^2/E (O-E)^2/V


addict$Rx=0 21 5.12 12.00 3.94 14.5
addict$Rx=1 21 14.55 7.68 6.16 14.5

Chisq= 14.5 on 1 degrees of freedom, p= 0.000143

Nilai pvalue yang diperoleh dari log rank test sebesar 0,000143 (p<0,05),
menunjukkan bahwa kurva survival berbeda secara signifikan antara kelompok
New Treatment dan kelompok Standard Treatment.

Syntax in R
response_variable=Surv(addict$Survt,addict$Relapse)
surv_model=coxph(response_variable~Rx)
summary(surv_model)

Output
Call:
coxph(formula = response_variable ~ Rx)

n= 42, number of events= 30

coef exp(coef) se(coef) z Pr(>|z|)


Rx 1.5721 4.8169 0.4124 3.812 0.000138 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

exp(coef) exp(-coef) lower .95 upper .95


Rx 4.817 0.2076 2.147 10.81

Concordance= 0.69 (se = 0.053 )


Rsquare= 0.322 (max possible= 0.988 )
Likelihood ratio test= 16.35 on 1 df, p=0.00005261
Wald test = 14.53 on 1 df, p=0.0001378
Score (logrank) test = 17.25 on 1 df, p=0.00003283
Syntax
surv_model_2=survreg(response_variable~addict$Rx,dist="exponential
")
summary(surv_model_2)

Output
Call:
survreg(formula = response_variable ~ addict$Rx, dist =
"exponential")
Value Std. Error z p
(Intercept) 3.69 0.333 11.06 2.00e-28
addict$Rx -1.53 0.398 -3.83 1.27e-04

Scale fixed at 1

Exponential distribution
Loglik(model)= -108.5 Loglik(intercept only)= -116.8
Chisq= 16.49 on 1 degrees of freedom, p= 0.000049
Number of Newton-Raphson Iterations: 4

Syntax
surv_model_3=survfit(response_variable~addict$Rx)
surv_model_3

Output
Call: survfit(formula = response_variable ~ addict$Rx)

n events median 0.95LCL 0.95UCL

addict$Rx=0 21 9 23 16 NA

addict$Rx=1 21 21 8 4 12

Syntax
plot_1=plot(surv_model_3,lty=c("solid","dashed"),col=c("black","bl
ue"),xlab="remission time in days",ylab="survival_probability")

legend("topright",c("New Treatment","Standard
Treatment"),lty=c("solid","dashed"),col=c("black","blue"))
Output

Syntax
plot_2=plot(surv_fit_1,lty=plotstuff$line,col=plotstuff$colour)

legend("topright",legend=surv_new$Rx,title="treatment",lty=plotstu
ff$line,col=plotstuff$col)

Output
Goodness of Fit Test adalah pengujian yang obyektif, karena memberikan statistik
uji dan nilai p untuk menilai asumsi PH untuk prediktor tertentu. Sejumlah statistik
uji yang berbeda diajukan oleh peneliti yang berbeda, namun metode umum untuk
melakukan Goodness of Fit Test adalah melihat Schoenfeld Residuals. Idenya di
sini adalah bahwa jika asumsi PH berlaku untuk kovariat tertentu, maka sisa
schoenfeld untuk kovariat tersebut tidak akan terkait dengan survival time.

Syntax
cox.zph(surv_model,transform=rank)

Output
rho chisq p

Rx -0.0296 0.0258 0.872

Karena nilai P dari uji residu Schoenfeld tinggi, oleh karena itu, treatment covariate
sesuai dengan asumsi cox-proportional hazard.

Stratifited Cox Model adalah modifikasi model CoxPH yang


memungkinkan untuk kontrol oleh stratifikasi prediktor yang tidak sesuai dengan
asumsi PH. Idenya adalah menjalankan model hazard Cox Proporsional pada
variabel yang memenuhi asumsi Cox PH di bawah strata dari variabel yang tidak
memenuhi asumsi Cox PH.

Syntax

response=Surv(addict$Survt,addict$Relapse)
explanatory_var=cbind(addict$Rx,addict$logWBC,addict$Sex)
addict_cox=coxph(response~addict$Rx, method="breslow")
addict_cox_2=coxph(response~addict$Rx+addict$logWBC+addict$Sex+add
ict$Rx*addict$logWBC+addict$Rx*addict$Sex, method="breslow")
addict_cox
addict_cox_2
Output
Call:
coxph(formula = response ~ addict$Rx, method = "breslow")

coef exp(coef) se(coef) z p


addict$Rx 1.51 4.52 0.41 3.68 0.00023

Likelihood ratio test=15.2 on 1 df, p=0.0000961


n= 42, number of events= 30
> addict_cox_2
Call:
coxph(formula = response ~ addict$Rx + addict$logWBC + addict$Sex
+ addict$Rx * addict$logWBC + addict$Rx * addict$Sex, method =
"breslow")

coef exp(coef) se(coef) z p


addict$Rx 0.895 2.448 1.816 0.49 0.62199
addict$logWBC 1.693 5.438 0.441 3.84 0.00012
addict$Sex -1.012 0.363 0.752 -1.35 0.17811
addict$Rx:addict$logWBC -0.151 0.859 0.531 -0.29 0.77539
addict$Rx:addict$Sex 1.952 7.045 0.907 2.15 0.03141

Likelihood ratio test=48.9 on 5 df, p=0.00000000228


n= 42, number of events= 30

Syntax
res_addict_cox=cox.zph(addict_cox)
res_addict_cox
plot(res_addict_cox)

Output
rho chisq p

addict$Rx -0.048 0.065 0.799


Syntax
addict_cox_strata=coxph(response~strata(addict$Rx)+addict$logWBC+a
ddict$Sex, method="breslow")
summary(addict_cox_strata)

Output
Call:
coxph(formula = response ~ strata(addict$Rx) + addict$logWBC +
addict$Sex, method = "breslow")

n= 42, number of events= 30

coef exp(coef) se(coef) z Pr(>|z|)


addict$logWBC 1.4294 4.1761 0.3166 4.514 0.00000636 ***
addict$Sex 0.2257 1.2532 0.4743 0.476 0.634
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

exp(coef) exp(-coef) lower .95 upper .95


addict$logWBC 4.176 0.2395 2.2452 7.768
addict$Sex 1.253 0.7979 0.4946 3.175

Concordance= 0.815 (se = 0.098 )


Rsquare= 0.443 (max possible= 0.964 )
Likelihood ratio test= 24.55 on 2 df, p=0.00000466
Wald test = 20.82 on 2 df, p=0.00003007
Score (logrank) test = 24.63 on 2 df, p=0.000004475
Syntax
res_addict_cox_2=cox.zph(addict_cox_strata)
plot(res_addict_cox_2)

Output

Syntax
kmfit_2=survfit(response~addict$Rx)
summary(kmfit_2,times=c(0,2,4,6,8,10,12,14,16,18,20))
Output
Call: survfit(formula = response ~ addict$Rx)

addict$Rx=0
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 21 0 1.000 0.0000 1.000 1.000
2 21 0 1.000 0.0000 1.000 1.000
4 21 0 1.000 0.0000 1.000 1.000
6 21 3 0.857 0.0764 0.720 1.000
8 16 1 0.807 0.0869 0.653 0.996
10 15 1 0.753 0.0963 0.586 0.968
12 12 0 0.753 0.0963 0.586 0.968
14 11 1 0.690 0.1068 0.510 0.935
16 11 1 0.627 0.1141 0.439 0.896
18 9 0 0.627 0.1141 0.439 0.896
20 8 0 0.627 0.1141 0.439 0.896

addict$Rx=1
time n.risk n.event survival std.err lower 95% CI upper 95% CI
0 21 0 1.0000 0.0000 1.0000 1.000
2 19 4 0.8095 0.0857 0.6579 0.996
4 16 3 0.6667 0.1029 0.4927 0.902
6 12 2 0.5714 0.1080 0.3945 0.828
8 12 4 0.3810 0.1060 0.2208 0.657
10 8 0 0.3810 0.1060 0.2208 0.657
12 6 4 0.1905 0.0857 0.0789 0.460
14 4 0 0.1905 0.0857 0.0789 0.460
16 3 1 0.1429 0.0764 0.0501 0.407
18 2 1 0.0952 0.0641 0.0255 0.356
20 2 0 0.0952 0.0641 0.0255 0.356
Syntax
plot(kmfit_2,lty=c("solid","dashed"),col=c("Red","blue"),xlab="sur
vival times in days",ylab="survival probability")

legend("topright",c("New Treatment","Standrd
Treatment"),lty=c("solid","dashed"),col=c("Red","blue"))

Output
Syntax
addict_cox_2$loglik
summary(addict_cox)

Output
Call:
coxph(formula = response ~ addict$Rx, method = "breslow")

n= 42, number of events= 30

coef exp(coef) se(coef) z Pr(>|z|)


addict$Rx 1.5092 4.5231 0.4096 3.685 0.000229 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

exp(coef) exp(-coef) lower .95 upper .95


addict$Rx 4.523 0.2211 2.027 10.09

Concordance= 0.69 (se = 0.053 )


Rsquare= 0.304 (max possible= 0.989 )
Likelihood ratio test= 15.21 on 1 df, p=0.00009615
Wald test = 13.58 on 1 df, p=0.0002288
Score (logrank) test = 15.93 on 1 df, p=0.00006571

Syntax
LRT=(-2)*(addict_cox$loglik[2]-addict_cox_2$loglik[2])
p_value= 1-pchisq(LRT,2)
p_value

Output

[1] 0.0000000473762

Anda mungkin juga menyukai