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

More informative error if time_point is zero #29

Open
sempwn opened this issue Sep 28, 2023 · 0 comments
Open

More informative error if time_point is zero #29

sempwn opened this issue Sep 28, 2023 · 0 comments

Comments

@sempwn
Copy link
Owner

sempwn commented Sep 28, 2023

timepoint in data for est_naloxone needs to start from 1, but produces unhelpful error message when indexed from 0.

THN_data <- bennu::generate_model_data()
# start index at 0 not 1
THN_data$times <- THN_data$times -1
fit <- bennu::est_naloxone(THN_data)

produces the following error

Error in eval(ei, envir) : 
  Exception: model_distribution_covariate_model_namespace::model_distribution_covariate_model: times[sym1__] is 0, but must be greater than or equal to 1 (in 'string', line 74, column 2 to column 52)
failed to create the sampler; sampling not done

Should do some data checking in est_naloxone function.

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

No branches or pull requests

1 participant