Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 2.32 KB

CONTRIBUTING.md

File metadata and controls

22 lines (19 loc) · 2.32 KB

Contributing to ciTools

We welcome contributions and want to work closely with collaborators to ensure that ciTools is high quality statistical software. To that end, we have compiled a list of tips to help you write R functions that fit into our existing system.

Tips for extending ciTools:

  1. Make use of S3 methods. Each of the functions add_{ci, pi, probs, quantile} is a generic that always accepts df as the first argument and fit as the second argument.
  2. Each method (and functions pertaining directly to that method) belongs in a separate file.
  3. Use existing interval estimation functions -- there is no reason to duplicate this effort. For example, addci.lm is just a wrapper around predict.lm.
  4. But think twice before adding a dependency and keep the number of dependencies to a minimum. Only rely on other packages that are well trusted in the R ecosystem. Consider adding new dependencies to the "Enhances:" line of the DESCRIPTION file instead of the "Imports:" line.
  5. It's okay if you can only write one of the functions for a new method. Generally, writing add_ci will be different than add_pi, but if add_pi can be written and implemented, then add_quantile and add_probs should follow without too much effort.
  6. Use Roxygen to create documentation for your functions.
  7. You must have a GPL3 blurb at the top of each file that assigns copyright to Institute for Defense Analyses.
  8. Functions that are not generics or methods belong in a separate file such as the helper_functions.R file.
  9. Don't submit your work until it is passing devtools::check() without any notes.
  10. If you are writing a new method, you will need to justify your work so the maintainers can understand how the interval estimates are formed and, if there are multiple interval types included, why one of them should be the default type. The best way to accomplish this is by writing good documentation and a vignette that shows how to use your new methods in an analysis.
  11. If you have a novel solution to an interval estimates problem, you will need to prepare a simulation study that addresses coverage probabilities and interval widths. See the vignette on Linear Mixed Models for an example of this.
  12. If your solutions are well studied, include citations.