Open njtierney opened 3 years ago
Here is an example of creating a new TF distribution in the F_distribution, this could be broken down in a vignette, discussing the key components that need to be provided for the user, as well as describing how in greta, there is a process for comparing distributions against a reference, which users might need to do if they are contributing to greta, or if they want their own work to be nice and stable.
A helper function to establish a new distribution. It would perhaps write onto the screen (as in datapasta::dpasta) write to to clipboard, or create a new "name.R" R file.
The idea is that you write in the details of the function into a function like,
use_new_distribution
, providing the name of the distribution, parameters, args, bounds, and whether it is in TFP.There might also be some helper functions to help users find their function + args in TFP as well.
Perhaps methods could be written to establish new distributions based on existing functions from packages like distributional, but perhaps that might be a bit too much magic.
The templating could be done with whisker
below is some pseudo code of how this might work.
This is an example distribution, this is the
gamma_distribution
function