-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow offspring
argument to be a function
#25
Comments
It kind of does already, if you define a function starting with |
so people would need to provide both the sampling and likelihood functions (potentially - probably someway to introspect some common ones) - that seems plausibly doable, if there's demand? |
Instead of requiring that, and in the spirit of what I understand to be the underlying issue ( |
sure, but: why not both? R is pretty good at introspection. could approach as
|
Yes, could do, though it would require some overhead as some function access the We could define a distribution S3 object which has optional |
weeeeeell, is there a "most typical" use case for particular arguments? e.g. seems like offspring and serial ought to typically be the if users want to use some atypical approach, they can always just pass a whole function. |
The likelihood function needs both as it relies on simulations to estimate the likelihood e.g. in the presence of underreporting. I'm not at all convinced the character string approach is ideal as it relies on functions being present in the environment which I'm sure can create complications in edge cases, and can requre e.g. loading whole packages into the environment even where only one or two functions are needed - but I'm also struggling to be convinced that the additional overhead from having to deal with multiple argument types is worth it - it would e.g. complicate integration with the Just to be clear, the current set up for |
my main complaint is inconsistent argument types are required, less so that I want a particular flavor supported (though my flavor preference is functions - sweet, sweet lambda action). |
See also discussion at #33 (comment) which I'll continue here |
An additional issue with a lambda approach is that it precludes the lookup for analytical likelihoods included with the package. |
the
offspring
argument tochain_sim
should support passing a function of n (likeserial
argument).The text was updated successfully, but these errors were encountered: