Kaplan Meier Analysis
Sex
cancerSys.kaplan <- cancerSys.data
cancerSys.kaplan[cancerSys.data$Sex == 0, "Sex"] <- "Female"
cancerSys.kaplan[cancerSys.data$Sex == 1, "Sex"] <- "Male"
survtest <- survdiff(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ Sex,
data = cancerSys.kaplan)
round(1 - pchisq(survtest$chisq, 1), 4)
## [1] 0.014
Primary type of Cancer
cancerSys.kaplan[cancerSys.data$Primary >= 3, "Primary"] <- "Kidney and Others"
cancerSys.kaplan[cancerSys.data$Primary == 1, "Primary"] <- "Breast"
cancerSys.kaplan[cancerSys.data$Primary == 2, "Primary"] <- "Prostate"
kaplan.primary <- survfit(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ Primary,
type="kaplan-meier",
data = cancerSys.kaplan)
survtest <- survdiff(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ Primary,
data = cancerSys.kaplan)
round(1 - pchisq(survtest$chisq, 2), 4)
## [1] 0.0872
X-Ray Pattern
cancerSys.kaplan.Xray <- cancerSys.data[!is.na(cancerSys.data$X.Ray.Pattern),]
cancerSys.kaplan.Xray[cancerSys.kaplan.Xray$X.Ray.Pattern == 1,"X.Ray.Pattern"] <- "Lystic"
cancerSys.kaplan.Xray[cancerSys.kaplan.Xray$X.Ray.Pattern == 2,"X.Ray.Pattern"] <- "Blastic"
cancerSys.kaplan.Xray[cancerSys.kaplan.Xray$X.Ray.Pattern == 3,"X.Ray.Pattern"] <- "Mixed"
cancerSys.kaplan.Xray$X.Ray.Pattern <- factor(cancerSys.kaplan.Xray$X.Ray.Pattern, c("Lystic",
"Blastic", "Mixed"))
survtest <- survdiff(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ X.Ray.Pattern,
data = cancerSys.kaplan)
round(1 - pchisq(survtest$chisq, 2), 4)
## [1] 0.1264
NSRE
cancerSys.kaplan.NSRE <- cancerSys.data[!is.na(cancerSys.data$NSRE),]
cancerSys.kaplan.NSRE$NSRE <- as.character(lapply(cancerSys.kaplan.NSRE$NSRE, function(x){
if(x >= 2){
"2+"
} else { # We want to keep the group if NSRE is lower than 3
as.character(x)
}
}))
survtest <- survdiff(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ NSRE,
data = cancerSys.kaplan.NSRE)
round(1 - pchisq(survtest$chisq, 2), 4)
## [1] 0.8027
NTX3 > 100
cancerSys.kaplan.NTX3 <- cancerSys.long %>% filter(time == 3) %>% filter(!duplicated(Patient)) %>%
mutate(NTX = NTX > 100)
chi.NTX3 <- survdiff(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ NTX,
data = cancerSys.kaplan.NTX3)
round(1-pchisq(chi.NTX3$chisq, length(chi.NTX3$n)-1),4)
## [1] 0.1497
NTX12 > 64
cancerSys.kaplan.NTX12 <- cancerSys.long %>% filter(time == 12) %>% filter(!duplicated(Patient)) %>%
mutate(NTX = NTX > 64)
chi.NTX12 <- survdiff(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ NTX,
data = cancerSys.kaplan.NTX12)
round(1-pchisq(chi.NTX12$chisq, length(chi.NTX12$n)-1),4)
## [1] 0.0171
Cox Analysis
Age
cox.age <- coxph(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ Age.Diagnosis,
data = cancerSys.data)
summary(cox.age)
## Call:
## coxph(formula = Surv(Survival.after.begining.ZA.mo, Death.Status) ~
## Age.Diagnosis, data = cancerSys.data)
##
## n= 147, number of events= 114
##
## coef exp(coef) se(coef) z Pr(>|z|)
## Age.Diagnosis 0.02155 1.02178 0.00722 2.985 0.00284 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## Age.Diagnosis 1.022 0.9787 1.007 1.036
##
## Concordance= 0.567 (se = 0.031 )
## Rsquare= 0.06 (max possible= 0.998 )
## Likelihood ratio test= 9.1 on 1 df, p=0.002561
## Wald test = 8.91 on 1 df, p=0.002837
## Score (logrank) test = 8.96 on 1 df, p=0.002757
Sex
cox.sex <- coxph(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ Sex,
data = cancerSys.data)
summary(cox.sex)
## Call:
## coxph(formula = Surv(Survival.after.begining.ZA.mo, Death.Status) ~
## Sex, data = cancerSys.data)
##
## n= 147, number of events= 114
##
## coef exp(coef) se(coef) z Pr(>|z|)
## Sex 0.473 1.605 0.194 2.438 0.0148 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## Sex 1.605 0.6231 1.097 2.347
##
## Concordance= 0.564 (se = 0.024 )
## Rsquare= 0.038 (max possible= 0.998 )
## Likelihood ratio test= 5.68 on 1 df, p=0.01719
## Wald test = 5.94 on 1 df, p=0.01478
## Score (logrank) test = 6.05 on 1 df, p=0.01389
NSRE
cox.NSRE <- coxph(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ NSRE,
data = cancerSys.kaplan)
summary(cox.NSRE)
## Call:
## coxph(formula = Surv(Survival.after.begining.ZA.mo, Death.Status) ~
## NSRE, data = cancerSys.kaplan)
##
## n= 146, number of events= 113
## (1 observation deleted due to missingness)
##
## coef exp(coef) se(coef) z Pr(>|z|)
## NSRE -0.04838 0.95277 0.08359 -0.579 0.563
##
## exp(coef) exp(-coef) lower .95 upper .95
## NSRE 0.9528 1.05 0.8088 1.122
##
## Concordance= 0.506 (se = 0.03 )
## Rsquare= 0.002 (max possible= 0.998 )
## Likelihood ratio test= 0.34 on 1 df, p=0.5583
## Wald test = 0.33 on 1 df, p=0.5627
## Score (logrank) test = 0.34 on 1 df, p=0.5627
NTX3
cox.NTX.3 <- coxph(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ NTX3,
data = cancerSys.data)
summary(cox.NTX.3)
## Call:
## coxph(formula = Surv(Survival.after.begining.ZA.mo, Death.Status) ~
## NTX3, data = cancerSys.data)
##
## n= 107, number of events= 87
## (40 observations deleted due to missingness)
##
## coef exp(coef) se(coef) z Pr(>|z|)
## NTX3 0.0003295 1.0003295 0.0004303 0.766 0.444
##
## exp(coef) exp(-coef) lower .95 upper .95
## NTX3 1 0.9997 0.9995 1.001
##
## Concordance= 0.572 (se = 0.035 )
## Rsquare= 0.005 (max possible= 0.998 )
## Likelihood ratio test= 0.54 on 1 df, p=0.4611
## Wald test = 0.59 on 1 df, p=0.4438
## Score (logrank) test = 0.59 on 1 df, p=0.4425
log(NTX3)
cox.NTX.3.log <- coxph(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ log(NTX3),
data = cancerSys.data)
summary(cox.NTX.3.log)
## Call:
## coxph(formula = Surv(Survival.after.begining.ZA.mo, Death.Status) ~
## log(NTX3), data = cancerSys.data)
##
## n= 107, number of events= 87
## (40 observations deleted due to missingness)
##
## coef exp(coef) se(coef) z Pr(>|z|)
## log(NTX3) 0.20209 1.22395 0.08822 2.291 0.022 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## log(NTX3) 1.224 0.817 1.03 1.455
##
## Concordance= 0.572 (se = 0.035 )
## Rsquare= 0.046 (max possible= 0.998 )
## Likelihood ratio test= 5.06 on 1 df, p=0.0245
## Wald test = 5.25 on 1 df, p=0.02197
## Score (logrank) test = 5.27 on 1 df, p=0.02173
NTX3 threshold
cox.NTX.3.threshold <- coxph(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ NTX3 > 100,
data = cancerSys.data)
summary(cox.NTX.3.threshold)
## Call:
## coxph(formula = Surv(Survival.after.begining.ZA.mo, Death.Status) ~
## NTX3 > 100, data = cancerSys.data)
##
## n= 107, number of events= 87
## (40 observations deleted due to missingness)
##
## coef exp(coef) se(coef) z Pr(>|z|)
## NTX3 > 100TRUE 0.3562 1.4279 0.2483 1.434 0.151
##
## exp(coef) exp(-coef) lower .95 upper .95
## NTX3 > 100TRUE 1.428 0.7004 0.8777 2.323
##
## Concordance= 0.54 (se = 0.026 )
## Rsquare= 0.018 (max possible= 0.998 )
## Likelihood ratio test= 1.95 on 1 df, p=0.1626
## Wald test = 2.06 on 1 df, p=0.1515
## Score (logrank) test = 2.08 on 1 df, p=0.1494
NTX12
cox.NTX.12 <- coxph(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ NTX12,
data = cancerSys.data)
summary(cox.NTX.12)
## Call:
## coxph(formula = Surv(Survival.after.begining.ZA.mo, Death.Status) ~
## NTX12, data = cancerSys.data)
##
## n= 51, number of events= 41
## (96 observations deleted due to missingness)
##
## coef exp(coef) se(coef) z Pr(>|z|)
## NTX12 0.0013674 1.0013683 0.0007646 1.788 0.0737 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## NTX12 1.001 0.9986 0.9999 1.003
##
## Concordance= 0.564 (se = 0.051 )
## Rsquare= 0.05 (max possible= 0.995 )
## Likelihood ratio test= 2.64 on 1 df, p=0.1043
## Wald test = 3.2 on 1 df, p=0.07371
## Score (logrank) test = 3.33 on 1 df, p=0.06814
log(NTX12)
cox.NTX.12.log <- coxph(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ log(NTX12),
data = cancerSys.data)
summary(cox.NTX.12.log)
## Call:
## coxph(formula = Surv(Survival.after.begining.ZA.mo, Death.Status) ~
## log(NTX12), data = cancerSys.data)
##
## n= 51, number of events= 41
## (96 observations deleted due to missingness)
##
## coef exp(coef) se(coef) z Pr(>|z|)
## log(NTX12) 0.2405 1.2719 0.1244 1.933 0.0533 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## log(NTX12) 1.272 0.7862 0.9966 1.623
##
## Concordance= 0.564 (se = 0.051 )
## Rsquare= 0.069 (max possible= 0.995 )
## Likelihood ratio test= 3.66 on 1 df, p=0.05565
## Wald test = 3.74 on 1 df, p=0.05327
## Score (logrank) test = 3.72 on 1 df, p=0.05368
NTX12 threshold
cox.NTX.12.threshold <- coxph(Surv(Survival.after.begining.ZA.mo, Death.Status) ~ NTX12 > 64,
data = cancerSys.data)
summary(cox.NTX.12.threshold)
## Call:
## coxph(formula = Surv(Survival.after.begining.ZA.mo, Death.Status) ~
## NTX12 > 64, data = cancerSys.data)
##
## n= 51, number of events= 41
## (96 observations deleted due to missingness)
##
## coef exp(coef) se(coef) z Pr(>|z|)
## NTX12 > 64TRUE 0.7882 2.1995 0.3387 2.327 0.02 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## exp(coef) exp(-coef) lower .95 upper .95
## NTX12 > 64TRUE 2.2 0.4546 1.132 4.272
##
## Concordance= 0.568 (se = 0.039 )
## Rsquare= 0.094 (max possible= 0.995 )
## Likelihood ratio test= 5.06 on 1 df, p=0.02451
## Wald test = 5.42 on 1 df, p=0.01996
## Score (logrank) test = 5.69 on 1 df, p=0.01711