Option to visualize event times and censoring times as dots in ppc_km_overlay()
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- r
- Domain
- data-visualization
Research direction
Start at the ppc_km_overlay() entry point and inspect how it currently plots Kaplan-Meier curves for event and censoring times. Add the requested optional dots behavior while preserving the default curve behavior, then verify that both visualization modes produce the intended plots.
Written by the indexing model from the issue text.
Description
I was presenting my work related to predictive model checking for survival models (Predictive Assessment and Comparison of Bayesian Survival Models for Cancer Recurrence) at StanCon and somebody asked me about a case where there are so few event times that the Kaplan-Meier curve is far from continuous. In this case, plotting the Kaplan-Meier curve for the observations is clumsy. A similar issue can arise if the time is discretized and there are only few different time points where events are happening, even though the number of events is high.
For these kinds of cases, I think it would be useful if ppc_km_overlay() had a binary parameter dots that could be used to plot the event times and censoring times as dots instead of plotting the Kaplan-Meier curve. The default value could still be dots = FALSE, which plots the Kaplan-Meier curve as before. There are some examples below.
When plotting the Kaplan-Meier curves for these two models, it can be a little bit unintuitive to say which one is fitting and which one is not, since you have to look at the points where the Kaplan-Meier curves fall.
In my opinion, the dots would be a clearer visualization, because from these you can instantly tell, which model fits and which does not.
Another nice thing about the dots is that they can indicate the exact locations where censoring is happening.
I have already implemented this in my own fork so I can make the pull request relatively easily if this is deemed to be a wanted feature for the package.
- Dominant language
- R
- Stars
- 442
- Forks
- 93
- Avg merge
- 3h 11m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stan-dev/bayesplot
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
pp_check and rvars Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 38/100
All issues in stan-dev/bayesplot
Similar issues
-
documentation pkg infrastructure
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
epiverse-trace/epiparameter#511 ·
-
function:write_dwc
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Urgent request: Due to vulnerabilities move to API version 12.6.1 (12.6.2 eventually) or 13.1.1 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jbkunst/highcharter#849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100