Question: How to compute a one tail (one way) log rank test for survival?
gravatar for denalitastic
4.3 years ago by
denalitastic30 wrote:

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?


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

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by denalitastic30
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2311 users visited in the last hour