Skip to content
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

Checking family argument #122

Closed
athowes opened this issue Jun 19, 2024 · 2 comments · Fixed by #144
Closed

Checking family argument #122

athowes opened this issue Jun 19, 2024 · 2 comments · Fixed by #144
Assignees

Comments

@athowes
Copy link
Collaborator

athowes commented Jun 19, 2024

I think that epidist_family should pass tests of this form. It currently doesn't.

test_that("the family argument in epidist_family.epidist_latent_individual gives suitable error for non-character input", { # nolint: line_length_linter.
  epidist_family(prep_obs, family = 1)
})

I propose to add the following to epidist_formula:

  1. Checking that the family passed in is a string
  2. (Maybe) checking that the string is a valid PDF

I am unsure on 2.

Resources

@athowes
Copy link
Collaborator Author

athowes commented Jul 10, 2024

Created a question on Stan forum about point 2: https://discourse.mc-stan.org/t/list-of-valid-pdf-strings-for-stan/35822

@athowes
Copy link
Collaborator Author

athowes commented Jul 11, 2024

My main point of uncertainity here whether it's worth using rstan::lookup for the price of importing rstan. Or whether we could store the list of valid LPDF functions as data and not need the package. (Then we'd need to rerun to keep it up to date.) This is for quite a small improvement in quality of life for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant