Question: R survival analysis : surv_pvalue vs fit.coxph for log-rank-test pvalue

0

ZheFrench •

**300**wrote:I have different value for test$pval and and other.pval that should return the same log-rank test p-value, no ?

```
surv_object <- Surv(time = as.numeric(final_group_annotated[,time]), event = final_group_annotated[,opt$endPoint] )it1 <- survfit(surv_object ~ group, data = final_group_annotated)
test=surv_pvalue(fit1, final_group_annotated)
print(test$pval)
```

0.3427874

```
fit.coxph <- coxph(surv_object ~ group, data = final_group_annotated)
print(summary(fit.coxph))
coxph(formula = surv_object ~ group, data = final_group_annotated)
n= 188, number of events= 30
coef exp(coef) se(coef) z Pr(>|z|)
groupgroup2 -0.3482 0.7060 0.3689 -0.944 0.345
exp(coef) exp(-coef) lower .95 upper .95
groupgroup2 0.706 1.417 0.3426 1.455
Concordance= 0.538 (se = 0.049 )
Likelihood ratio test= 0.87 on 1 df, p=0.4
Wald test = 0.89 on 1 df, p=0.3
Score (logrank) test = 0.9 on 1 df, p=0.3
other.pval <- coef(summary(fit.coxph))[,5]
print(other.pval)
```

0.3452066

ADD COMMENT
• link
•
modified 10 months ago
by
Kevin Blighe ♦

**65k**• written 10 months ago by ZheFrench •**300**