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

Improve Documentation: Use get_foi_index() Instead of Manual rep(...) for foi_index in fit_seromodel Examples #204

Open
JDConejeros opened this issue Aug 28, 2024 · 1 comment
Assignees

Comments

@JDConejeros
Copy link

Is your feature request related to a problem? Please describe.

The documentation for the fit_seromodel function in the serofoi package currently suggests setting the foi_index argument manually using rep(...). However, the package provides a more automated and reliable method to generate this index using the get_foi_index() function. Using get_foi_index() not only simplifies the process but also reduces the risk of user error when manually creating the index.

The specific issue in the documentation can be found in the following example:

seromodel_time_normal <- fit_seromodel(
  serosurvey = serosurvey_sw_dec,
  model_type = "time",
  foi_index = rep(c(1, 2, 3), c(25, 10, 15)),
  iter = 1500
)
plot_seromodel(
  seromodel_time_normal,
  serosurvey = serosurvey_sw_dec,
  foi_df = foi_df,
  size_text = 6
)

This example is provided in the package's documentation here: https://epiverse-trace.github.io/serofoi/articles/foi_models.html

Describe the solution you'd like
I recommend updating the documentation for the fit_seromodel function to replace the manual example of foi_index = rep(...) with the automatic method foi_index = get_foi_index(survey_features, group_size = 15). This change would better align the documentation with best practices and encourage users to utilize the built-in functions of the package.

Additional context
Incorporating get_foi_index() into the examples would also help users better understand how to leverage the full functionality of the package, leading to more efficient and accurate model specifications.

@ntorresd
Copy link
Member

ntorresd commented Sep 9, 2024

Hi @JDConejeros, thanks a lot for your feedback!

We are aware of the lack of documentation about the use of get_foi_index and FOI indexation in general. In #200 @ben18785 suggested we should write a package article about FOI indexation to the package and I think that's a good way to address this issue in a compelling way.

@ben18785, we should discuss the contents of this article here.

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

2 participants