epiverse-trace / serofoi

Estimates the Force-of-Infection of a given pathogen from population based sero-prevalence studies
https://epiverse-trace.github.io/serofoi/
Other
17 stars 4 forks source link

Improve error messages for `plot_foi_estimates` and `plot_rhats` #222

Open jpavlich opened 5 hours ago

jpavlich commented 5 hours ago

When passing constant seromodel as parameter to plot_foi_estimates and plot_rhats, it yields the following error

Error in plot_foi_estimates(seromodel, serosurvey) : 
  seromodel@name should start with either 'age' or 'time'

It is a little unintuitive, since it assumes the user know that seromodel@model_name begins with 'age' or 'time' for age or time models, respectively.

I would suggest changing it to "seromodel type must be 'age' or 'time'"

jpavlich commented 5 hours ago

@ntorresd If you agree, you can assign me this issue. I will fix it as soon as #215 is merged into dev