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

Merge dev into main #127

Merged
merged 22 commits into from
Oct 11, 2023
Merged

Merge dev into main #127

merged 22 commits into from
Oct 11, 2023

Conversation

Bisaloo
Copy link
Member

@Bisaloo Bisaloo commented Oct 11, 2023

No description provided.

@ntorresd ntorresd marked this pull request as ready for review October 11, 2023 13:20
ntorresd and others added 22 commits October 11, 2023 08:21
This commit changes the removed preloaded dataset `serodata` for the identical `chagas2012`.
…ule.

This change is meant to simplify `fit_seromodel()`. This commit also changes the name of the stanfit object in the output of `fit_seromodel()` from `fit` to `seromodel_fit`.
… .RDS and updates test_visualization accordingly
* Enabling CMD check when doing pull request on `dev`

* Removed tidyverse dependency
* refac: `fit_seromodel` returns a stanfit object
`fit_seromodel` returns a stanfit object now, which induces changes all across the pachage
- `seromodel_object$seromodel_fit -> seromodel_object`:
    * `get_foi_central_estimates`
    * `extract_seromodel_summary`
    * `plot_seroprev_fitted`
    * `plot_foi`
    * `plot_rhats`
    * `plot_seromodel`
    * `get_table_rhats`
- add `serodata` as input:
    * `get_foi_central_estimates`
    * `extract_seromodel_summary`
    * `plot_seroprev_fitted`
    * `plot_seromodel`
    * `plot_rhats`
    * `plot_foi`
    * `get_table_rhats`
- use of `exposure_years` (this suggest adding a function for this purpose):
    * `get_foi_central_estimates`
    * `get_table_rhats`
- minor corrections:
    * `plot_seromodel` -> correction to exception

* tests(refac): re-generate .RDS files used in tests

* tests(refac): update tests according to 7be19f9
- change `model_object$seromodel_fit` to `model_object`
- add `serodata` as input where needed
- minor syntax changes to test_issue_47.R

* fix examples
Fix examples of functions across the package in accordance to the
new output of `fit_seromodel`.

Updated examples:
- `get_table_rhats`
- `get_foi_central_estimates`
- `get_prev_expanded`
- `extract_seromodel_summary`
- `plot_seroprev_fitted`
- `plot_foi`
- `plot_rhats`
- `plot_seromodel`
- `plot_info_table`

* refac: replace `get_exposure_ages` for `get_cohort_ages`

add `get_cohort_ages`: this function serves as replacement for
`get_exposure_ages` and also includes the information of
`exposure_years`, which was being used in some functions.

Affected functions:
- `fit_seromodel`
- `get_exposure_matrix`
- `get_table_rhats`

* test: add test for `get_cohort_ages` to the test_modelling.R

* refac: replace `serodata` for `cohort_ages` where needed

Affected functions:
- `get_table_rhats`
- `get_foi_central_estimates`
- `extract_seromodel_summary`
- `plot_foi`
- `plot_rhats`
- `plot_seromodel`

* doc: update documentation
use @inheritParams to simplify documentation

* add comment to exception in `fit_seromodel`

* refac: specify argument `parameter_name`
Explicitely specify argument `parameter_name = "logLikelihood"`
in `loo::loo`

* change condition to check whether sampling is done or not

* doc: update vignettes according to changes

* doc: update documentation and examples
parameter `seromodel_object` description correction in
`get_foi_central_estimates`
add input check for `age_mean_f` in `serodata` in the following functions
- `prepare_serodata`
- `prepare_bin_data`
* Added argument matching in fit_seromodel()

* Added allowed options to arg foi_model

* Added input validation to prepare_serodata()

* Fixed the check for required columns

* Regenerated the docs

---------

Co-authored-by: ntorresd <[email protected]>
To keep a reasonable repo size
@ntorresd ntorresd merged commit 36b7e9c into main Oct 11, 2023
7 checks passed
@ntorresd ntorresd deleted the dev2 branch October 11, 2023 18:59
@ntorresd ntorresd restored the dev2 branch October 13, 2023 04:15
@ntorresd ntorresd deleted the dev2 branch October 16, 2023 15:59
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

Successfully merging this pull request may close these issues.

4 participants