-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
p value calculated by ggsurvplot using Gehan-Breslow test(log.rank.weights = "n") is wrong #453
Comments
Any new about this?? Thanks |
I don't know what you mean? |
No, it's for @kassambara... if he's already solved this problem you commented (or have you found another solution?). Sorry the confusion! |
did you also found this problem when you use ggsurvplot package? I assumed that just I meet this problem |
I had the same problem. It's like surv_pvalue is not updated, but if you write the full name "gehan-breslow" it works.
However in ggsurvplot if you write gehan-breslow" doesn't work Error in (function (fit, data = NULL, fun = NULL, color = NULL, palette = NULL, : |
fixed now, thanks |
when I use ggsurvplot to plot a K-M curve and make statistic test, I set log.rank.weights = "n" (Gehan-Breslow test, not default "log rank test"), however, the p value is same to that calculated by log rank test method, and the plot still showed words "log-rank". I use survdiff and surv_pvalue to recalculate p value (both use Gehan-Breslow test), the p-value calculated by survdiff is same to that calculate by surv_pvalue, and same to p value calculated by SPSS K-M(Breslow method. that is to say p value(survdiff- breslow method) = p value( surv_pvalue - breslow method) = p value(SPSS k-m breslow) ≠ p value (ggsurvplot, log.rank.weights ="n", also breslow method). I don't know why.
code in following
library(survival)
library(survminer)
View(lung)
attach(lung)
fit <- survfit(Surv(time, status) ~ sex, data= lung)
ggsurvplot(fit, data = lung, ggtheme= theme_bw(), risk.table = T, pval = TRUE, pval.method = TRUE, surv.median.line = "hv", tables.height = 0.2, xlim = c(0, 110),
log.rank.weights= "n" )
survdiff(Surv(time, status) ~ sex, rho = 1)
surv_pvalue(fit, method = "Gehan-Breslow")
The text was updated successfully, but these errors were encountered: