university-of-newcastle-research / pmwg

Repository for code for the Samplers Team at UoN
3 stars 3 forks source link

Allow more arguments to be passed to likelihood function #77

Open gjcooper opened 8 months ago

gjcooper commented 8 months ago

If my likelihood expects other arguments (stable across participants and iterations) then I need to use purrr::partial or other methods to create a partial function, or "expect" the value I am trying to access to be available in the global state.

It would be nice if instead the function can taken any number of arguments (with x and data being essential as before) and then run_stage collects all unspecified arguments using something like ... that then gets passed to the likelihood function.