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.
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
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
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
abind 1.4-5 2016-07-21 [1] CRAN (R 4.0.0)
arm 1.11-2 2020-07-27 [1] CRAN (R 4.0.2)
assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.0)
backports 1.1.8 2020-06-17 [1] CRAN (R 4.0.2)
base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.0.0)
bayesplot 1.7.2 2020-05-28 [1] CRAN (R 4.0.2)
bayestestR 0.7.2 2020-07-20 [1] CRAN (R 4.0.2)
blob 1.2.1 2020-01-20 [1] CRAN (R 4.0.0)
boot 1.3-25 2020-04-26 [1] CRAN (R 4.0.0)
bridgesampling 1.0-0 2020-02-26 [1] CRAN (R 4.0.0)
brms 2.13.5 2020-07-31 [1] CRAN (R 4.0.2)
Brobdingnag 1.2-6 2018-08-13 [1] CRAN (R 4.0.0)
broom 0.7.0 2020-07-09 [1] CRAN (R 4.0.2)
callr 3.4.4 2020-09-07 [1] CRAN (R 4.0.2)
car 3.0-9 2020-08-11 [1] CRAN (R 4.0.2)
carData 3.0-4 2020-05-22 [1] CRAN (R 4.0.0)
cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.0.0)
checkmate 2.0.0 2020-02-06 [1] CRAN (R 4.0.0)
chron 2.3-56 2020-08-18 [1] CRAN (R 4.0.2)
cli 2.0.2 2020-02-28 [1] CRAN (R 4.0.0)
cluster 2.1.0 2019-06-19 [2] CRAN (R 4.0.2)
cmprsk 2.2-10 2020-06-09 [1] CRAN (R 4.0.0)
coda 0.19-3 2019-07-05 [1] CRAN (R 4.0.0)
codetools 0.2-16 2018-12-24 [2] CRAN (R 4.0.2)
colorspace 1.4-1 2019-03-18 [1] CRAN (R 4.0.0)
colourpicker 1.1.0 2020-09-14 [1] CRAN (R 4.0.2)
crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.0)
crosstalk 1.1.0.1 2020-03-13 [1] CRAN (R 4.0.0)
curl 4.3 2019-12-02 [1] CRAN (R 4.0.0)
data.table 1.12.8 2019-12-09 [1] CRAN (R 4.0.0)
DBI 1.1.0 2019-12-15 [1] CRAN (R 4.0.0)
dbplyr 1.4.4 2020-05-27 [1] CRAN (R 4.0.0)
desc 1.2.0 2018-05-01 [1] CRAN (R 4.0.0)
devtools 2.3.2 2020-09-18 [1] CRAN (R 4.0.2)
digest 0.6.25 2020-02-23 [1] CRAN (R 4.0.0)
dplyr 1.0.0 2020-05-29 [1] CRAN (R 4.0.2)
DT 0.15 2020-08-05 [1] CRAN (R 4.0.2)
dygraphs 1.1.1.6 2018-07-11 [1] CRAN (R 4.0.0)
effects 4.2-0 2020-08-11 [1] CRAN (R 4.0.2)
effectsize 0.3.3 2020-09-17 [1] CRAN (R 4.0.2)
ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.0)
emmeans 1.5.1 2020-09-18 [1] CRAN (R 4.0.2)
estimability 1.3 2018-02-11 [1] CRAN (R 4.0.0)
evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.0)
fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.0)
farver 2.0.3 2020-01-16 [1] CRAN (R 4.0.0)
fastmap 1.0.1 2019-10-08 [1] CRAN (R 4.0.0)
forcats 0.5.0 2020-03-01 [1] CRAN (R 4.0.0)
foreign 0.8-80 2020-05-24 [2] CRAN (R 4.0.2)
Formula 1.2-3 2018-05-03 [1] CRAN (R 4.0.0)
fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2)
generics 0.0.2 2018-11-29 [1] CRAN (R 4.0.0)
ggeffects 0.16.0 2020-09-13 [1] CRAN (R 4.0.2)
ggforce 0.3.2 2020-06-23 [1] CRAN (R 4.0.2)
ggplot2 3.3.2 2020-06-19 [1] CRAN (R 4.0.2)
ggpubr 0.4.0 2020-06-27 [1] CRAN (R 4.0.2)
ggridges 0.5.2 2020-01-12 [1] CRAN (R 4.0.0)
ggsignif 0.6.0 2019-08-08 [1] CRAN (R 4.0.0)
glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2)
gridExtra 2.3 2017-09-09 [1] CRAN (R 4.0.0)
gt 0.2.2 2020-08-05 [1] CRAN (R 4.0.2)
gtable 0.3.0 2019-03-25 [1] CRAN (R 4.0.0)
gtools 3.8.2 2020-03-31 [1] CRAN (R 4.0.0)
HardyWeinberg 1.6.8 2020-09-20 [1] CRAN (R 4.0.2)
haven 2.3.1 2020-06-01 [1] CRAN (R 4.0.2)
Hmisc 4.4-1 2020-08-10 [1] CRAN (R 4.0.2)
hms 0.5.3 2020-01-08 [1] CRAN (R 4.0.0)
htmlTable 2.1.0 2020-09-16 [1] CRAN (R 4.0.2)
htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.2)
htmlwidgets 1.5.1 2019-10-08 [1] CRAN (R 4.0.0)
httpuv 1.5.4 2020-06-06 [1] CRAN (R 4.0.0)
httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2)
igraph 1.2.5 2020-03-19 [1] CRAN (R 4.0.0)
inline 0.3.16 2020-09-06 [1] CRAN (R 4.0.2)
insight 0.9.6 2020-09-20 [1] CRAN (R 4.0.2)
JM 1.4-8 2018-04-16 [1] CRAN (R 4.0.2)
jpeg 0.1-8.1 2019-10-24 [1] CRAN (R 4.0.0)
jsonlite 1.7.1 2020-09-07 [1] CRAN (R 4.0.2)
kableExtra 1.2.1 2020-08-27 [1] CRAN (R 4.0.2)
km.ci 0.5-2 2009-08-30 [1] CRAN (R 4.0.0)
KMsurv 0.1-5 2012-12-03 [1] CRAN (R 4.0.0)
knitr 1.30 2020-09-22 [1] CRAN (R 4.0.2)
labeling 0.3 2014-08-23 [1] CRAN (R 4.0.0)
labelled 2.7.0 2020-09-21 [1] CRAN (R 4.0.2)
later 1.1.0.1 2020-06-05 [1] CRAN (R 4.0.0)
lattice 0.20-41 2020-04-02 [1] CRAN (R 4.0.2)
latticeExtra 0.6-29 2019-12-19 [1] CRAN (R 4.0.0)
lifecycle 0.2.0 2020-03-06 [1] CRAN (R 4.0.0)
lme4 1.1-23 2020-04-07 [1] CRAN (R 4.0.2)
lmerTest 3.1-2 2020-04-08 [1] CRAN (R 4.0.2)
loo 2.3.1 2020-07-14 [1] CRAN (R 4.0.2)
lubridate 1.7.9 2020-06-08 [1] CRAN (R 4.0.0)
magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.0)
markdown 1.1 2019-08-07 [1] CRAN (R 4.0.0)
MASS 7.3-53 2020-09-09 [1] CRAN (R 4.0.2)
Matrix 1.2-18 2019-11-27 [2] CRAN (R 4.0.2)
matrixStats 0.57.0 2020-09-25 [1] CRAN (R 4.0.2)
memoise 1.1.0 2017-04-21 [1] CRAN (R 4.0.0)
mice 3.11.0 2020-08-05 [1] CRAN (R 4.0.2)
mime 0.9 2020-02-04 [1] CRAN (R 4.0.0)
miniUI 0.1.1.1 2018-05-18 [1] CRAN (R 4.0.0)
minqa 1.2.4 2014-10-09 [1] CRAN (R 4.0.0)
mitools 2.4 2019-04-26 [1] CRAN (R 4.0.0)
modelr 0.1.8 2020-05-19 [1] CRAN (R 4.0.0)
multcomp 1.4-14 2020-09-23 [1] CRAN (R 4.0.2)
MuMIn 1.43.17 2020-04-15 [1] CRAN (R 4.0.2)
munsell 0.5.0 2018-06-12 [1] CRAN (R 4.0.0)
mvtnorm 1.1-1 2020-06-09 [1] CRAN (R 4.0.0)
nlme 3.1-149 2020-08-23 [1] CRAN (R 4.0.2)
nloptr 1.2.2.2 2020-07-02 [1] CRAN (R 4.0.2)
nnet 7.3-14 2020-04-26 [1] CRAN (R 4.0.0)
numDeriv 2016.8-1.1 2019-06-06 [1] CRAN (R 4.0.0)
openxlsx 4.1.5 2020-05-06 [1] CRAN (R 4.0.0)
pacman 0.5.1 2019-03-11 [1] CRAN (R 4.0.2)
parameters 0.8.6 2020-09-21 [1] CRAN (R 4.0.2)
performance 0.5.0 2020-09-12 [1] CRAN (R 4.0.2)
pillar 1.4.6 2020-07-10 [1] CRAN (R 4.0.2)
pkgbuild 1.1.0 2020-07-13 [1] CRAN (R 4.0.2)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.0)
pkgload 1.1.0 2020-05-29 [1] CRAN (R 4.0.0)
plyr 1.8.6 2020-03-03 [1] CRAN (R 4.0.0)
png 0.1-7 2013-12-03 [1] CRAN (R 4.0.0)
polyclip 1.10-0 2019-03-14 [1] CRAN (R 4.0.0)
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.0.0)
processx 3.4.4 2020-09-03 [1] CRAN (R 4.0.2)
promises 1.1.1 2020-06-09 [1] CRAN (R 4.0.0)
ps 1.3.4 2020-08-11 [1] CRAN (R 4.0.2)
pscl 1.5.5 2020-03-07 [1] CRAN (R 4.0.0)
purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.0)
R6 2.4.1 2019-11-12 [1] CRAN (R 4.0.0)
RColorBrewer 1.1-2 2014-12-07 [1] CRAN (R 4.0.0)
Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.2)
D RcppParallel 5.0.2 2020-06-24 [1] CRAN (R 4.0.2)
readr 1.3.1 2018-12-21 [1] CRAN (R 4.0.0)
readxl 1.3.1 2019-03-13 [1] CRAN (R 4.0.0)
remotes 2.2.0 2020-07-21 [1] CRAN (R 4.0.2)
reprex 0.3.0 2019-05-16 [1] CRAN (R 4.0.0)
reshape2 1.4.4 2020-04-09 [1] CRAN (R 4.0.0)
rio 0.5.16 2018-11-26 [1] CRAN (R 4.0.0)
rlang 0.4.7.9000 2020-07-14 [1] Github (r-lib/rlang@5da6493)
rmarkdown 2.3 2020-06-18 [1] CRAN (R 4.0.0)
rpart 4.1-15 2019-04-12 [2] CRAN (R 4.0.2)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 4.0.0)
rsconnect 0.8.16 2019-12-13 [1] CRAN (R 4.0.0)
Rsolnp 1.16 2015-12-28 [1] CRAN (R 4.0.2)
rstan 2.21.2 2020-07-27 [1] CRAN (R 4.0.2)
rstanarm 2.21.1 2020-07-20 [1] CRAN (R 4.0.2)
rstantools 2.1.1 2020-07-06 [1] CRAN (R 4.0.2)
rstatix 0.6.0 2020-06-18 [1] CRAN (R 4.0.0)
rstudioapi 0.11 2020-02-07 [1] CRAN (R 4.0.0)
rvest 0.3.6 2020-07-25 [1] CRAN (R 4.0.2)
sandwich 2.5-1 2019-04-06 [1] CRAN (R 4.0.0)
scales 1.1.1 2020-05-11 [1] CRAN (R 4.0.0)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.0)
shiny 1.5.0 2020-06-23 [1] CRAN (R 4.0.2)
shinyjs 2.0.0 2020-09-09 [1] CRAN (R 4.0.2)
shinystan 2.5.0 2018-05-01 [1] CRAN (R 4.0.0)
shinythemes 1.1.2 2018-11-06 [1] CRAN (R 4.0.0)
sjlabelled 1.1.7 2020-09-24 [1] CRAN (R 4.0.2)
sjmisc 2.8.5 2020-05-28 [1] CRAN (R 4.0.2)
sjPlot 2.8.5 2020-09-24 [1] CRAN (R 4.0.2)
sjstats 0.18.0 2020-05-06 [1] CRAN (R 4.0.2)
socviz 1.2 2020-06-10 [1] CRAN (R 4.0.0)
srvyr 0.4.0 2020-07-30 [1] CRAN (R 4.0.2)
StanHeaders 2.21.0-6 2020-08-16 [1] CRAN (R 4.0.2)
stargazer 5.2.2 2018-05-30 [1] CRAN (R 4.0.0)
statmod 1.4.34 2020-02-17 [1] CRAN (R 4.0.0)
stringi 1.4.6 2020-02-17 [1] CRAN (R 4.0.0)
stringr 1.4.0 2019-02-10 [1] CRAN (R 4.0.0)
survey 4.0 2020-04-03 [1] CRAN (R 4.0.2)
survival 3.2-3 2020-06-13 [1] CRAN (R 4.0.0)
survminer 0.4.8 2020-07-25 [1] CRAN (R 4.0.2)
survMisc 0.5.5 2018-07-05 [1] CRAN (R 4.0.0)
table1 1.2 2020-03-23 [1] CRAN (R 4.0.2)
tableone 0.12.0 2020-07-26 [1] CRAN (R 4.0.2)
telegram 0.6.0 2016-09-17 [1] CRAN (R 4.0.0)
telegram.bot 2.4.0 2019-10-19 [1] CRAN (R 4.0.0)
testthat 2.3.2 2020-03-02 [1] CRAN (R 4.0.0)
TH.data 1.0-10 2019-01-21 [1] CRAN (R 4.0.0)
threejs 0.3.3 2020-01-21 [1] CRAN (R 4.0.0)
tibble 3.0.3.9000 2020-07-14 [1] Github (tidyverse/tibble@66a503f) tidyr 1.1.0 2020-05-20 [1] CRAN (R 4.0.2)
tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.0)
tidyverse 1.3.0 2019-11-21 [1] CRAN (R 4.0.2)
tinytex 0.26 2020-09-22 [1] CRAN (R 4.0.2)
truncnorm 1.0-8 2018-02-27 [1] CRAN (R 4.0.2)
tweenr 1.0.1 2018-12-14 [1] CRAN (R 4.0.0)
usethis 1.6.3 2020-09-17 [1] CRAN (R 4.0.2)
uuid 0.1-4 2020-02-26 [1] CRAN (R 4.0.0)
V8 3.2.0 2020-06-19 [1] CRAN (R 4.0.2)
vctrs 0.3.2 2020-07-15 [1] CRAN (R 4.0.2)
viridisLite 0.3.0 2018-02-01 [1] CRAN (R 4.0.0)
webshot 0.5.2 2019-11-22 [1] CRAN (R 4.0.0)
withr 2.3.0 2020-09-22 [1] CRAN (R 4.0.2)
writexl 1.3.1 2020-08-26 [1] CRAN (R 4.0.2)
xfun 0.15 2020-06-21 [1] CRAN (R 4.0.2)
xml2 1.3.2 2020-04-23 [1] CRAN (R 4.0.0)
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.0.0)
xts 0.12.1 2020-09-09 [1] CRAN (R 4.0.2)
yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.0)
zip 2.0.4 2019-09-01 [1] CRAN (R 4.0.0)
zoo 1.8-8 2020-05-02 [1] CRAN (R 4.0.0)
[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.