kassambara / survminer

Survival Analysis and Visualization
https://rpkgs.datanovia.com/survminer/
507 stars 162 forks source link

Survival rate and cumulative hazard function plotting #498

Open muntasirmasum opened 4 years ago

muntasirmasum commented 4 years ago

Expected behavior

While plotting adjusted survival curves using "ggadjustedcurves" and adding the argument fun = "cumhaz", the curve should always go up at it is plotting the cumulative hazard function (f(y) = -log(y)).

Actual behavior

However, with or without the fun = "cumhaz" argument, the adjusted survival curves are showing the survival rates, which is going downwards.

Steps to reproduce the problem

ggadjustedcurves(fit2, data = bladder, method = "conditional", variable = "rx") curve <- surv_adjustedcurves(fit2, data = bladder, method = "conditional", variable = "rx")

ggadjustedcurves(fit2, data = bladder, method = "conditional", variable = "rx") curve <- surv_adjustedcurves(fit2, data = bladder, method = "conditional", fun = "cumhaz", variable = "rx")

Both of these curves are the same.

session_info()

Session info --------------------------------------------------------------------------------------------------

version R version 4.0.2 (2020-06-22) os Windows 10 x64
system x86_64, mingw32
ui RStudio
language (EN)
collate English_United States.1252
ctype English_United States.1252
tz America/Chicago
date 2020-10-01

[1] C:/Users/munta/Documents/R/win-library/4.0 [2] C:/Program Files/R/R-4.0.2/library

D -- DLL MD5 mismatch, broken installation.

muntasirmasum commented 4 years ago

I was wondering if this issue could be addressed.