bayesplot icon indicating copy to clipboard operation
bayesplot copied to clipboard

add contributing guidelines

Open tjmahr opened this issue 4 years ago • 2 comments

A user on the forum said that they wouldn't mind contributing but felt unsure of what makes a contribution complete. We should add contributing guidelines.

tjmahr avatar Dec 02 '19 16:12 tjmahr

Yes. I would also like to know how you can contribute. I'm interested in additional posterior prospective checks for other variables types like survival showing Kaplan-Meier plots for example

fkgruber avatar Jul 02 '20 14:07 fkgruber

@fkgruber Glad you're interested in contributing, that would be great! We still need to make a Contributing Guidelines, but maybe we can use this as the opportunity to do that. What would be the most useful info for you that would help you start contributing? I'll put some things below, but let me know what else would help.

Regarding survival plots, that would be great. Here are a few thoughts:

  • Right now the posterior predictive checks (PPCs) are organized into several categories (see https://mc-stan.org/bayesplot/reference/index.html#section-ppc) and it could make sense to add a new category for PPCs for survival models if there are multiple types of PPC plots that would be useful for survival models. If there's just one or two then we could include them in whichever existing category makes most sense.

  • To add a new ppc_* function the steps I recommend would basically be this:

  1. Write some rough ggplot code that makes a plot like what you're envisioning (doesn't have to be a function ready to go in the package, it's fine for the code to be as if you were making the plot only for yourself casually)
  2. Open a new issue here and include your rough ggplot code and an example (e.g. attach a png) of what the plot you'd like to add would look like. We can then discuss and give you suggestions.
  3. If you're happy with the feedback from step 2. then wrap your code in a ppc_ function that basically works like this:
    • take y and yrep as the first two arguments plus any other arguments you need
    • reformat the data into a data frame to pass to ggplot
    • make the plot and return the ggplot object
  4. Open a pull request with your new function that closes the issue you opened in step 2

Of course if you have lots of questions along the way that's fine!

Anyway, it would be great to have some plots specifically for survival models and it would be great to have more contributors, so definitely let us know what other info would help!

jgabry avatar Jul 02 '20 15:07 jgabry

It seems the commit https://github.com/stan-dev/bayesplot/commit/17c67cebb1ecd1d573cd2097e111247bd35c4461 added contributing guidelines. Can this issue be closed?

avehtari avatar Jan 15 '24 12:01 avehtari

Yeah, let's close this. I will add a link in the readme to the new CONTRIBUTING.md file

jgabry avatar Jan 16 '24 17:01 jgabry