How to compute a one tail (one way) log rank test for survival?
1
0
Entering edit mode
7.5 years ago
denalitastic ▴ 30

I have censored survival data. I have been using a log rank test to get a p-value for overall survival. For example in R I have been using the survdiff function from the survival package and the below chisq test to find a survival pvalue. However this gives you the 2 tail test p value. I am only interested in one direction, For example do the patients with some mutation have better survival. My hypothesis is such that I am not interested in the other direction. Chisq being a goodness of fit measure captures both directions. What would be the equivalent code or reasoning to capture the one way or one tail logrank p value?

Thanks

input<-as.formula(paste0("Surv(survival_time,censoring_status) ~ ",gene_name))
gene.survival <-survdiff(input,data=data)
p.val <-  1 - pchisq(gene.survival$chisq, length(gene.survival$n) - 1)

one-way one way one-tailed one tail log-rank

R survival hypothesis-testing log-rank • 5.0k views
ADD COMMENT
0
Entering edit mode
9 days ago
jack • 0

Hello, it has been 7 years since denalitastic posted this question. I come into the same question right now and here is the solution i find: https://github.com/gpaux/Mediana/blob/e3a7d7f49292f1f3e4b91e831d957353b798df36/R/LogrankTest.R#L6 It seems that we can use hazard ratio to decide whether the test is on the "way", or, "direction" we want. If the test is on the dection we want, the p value for one sided test is just half of the p value that survdiff provides, and if not the direction we want, the p value is just 1. Yet I think if not the direction we want, the p value should be 1 minus the half of the p value.

ADD COMMENT

Login before adding your answer.

Traffic: 1514 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6