[ ] don't deal with it at all and leave it to the users.
[ ] write a function that accepts 'survfit2' objects and can return the results from survdiff(). this would focus on reporting the p-value in a format that makes it easy to report in a figure caption.
maybe the function is just called survdiff2() with the only difference is that instead of formula and data arguments, it accepts a survfit2 object.
we could export sister functions that report the p-values directly, e.g. logrank() would return a formatted p-value, p_logrank() would return the formatted p-value with the "p" preprended, e.g. p = 0.12.
The first version of the pkg we release could just ignore p-values altogether while we decide on an API?
OPTIONS
survdiff()
. this would focus on reporting the p-value in a format that makes it easy to report in a figure caption.survdiff2()
with the only difference is that instead of formula and data arguments, it accepts a survfit2 object.logrank()
would return a formatted p-value,p_logrank()
would return the formatted p-value with the "p" preprended, e.g.p = 0.12
.The first version of the pkg we release could just ignore p-values altogether while we decide on an API?