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

Bug age risk #44

Merged
merged 4 commits into from
Oct 12, 2023
Merged

Bug age risk #44

merged 4 commits into from
Oct 12, 2023

Conversation

juan-umana
Copy link
Member

@juan-umana juan-umana commented Oct 12, 2023

  • Please check if the PR fulfills these requirements
  • I have read the CONTRIBUTING guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This Pull Request fix bug reported in #43 reported by @Juanmontenegro99

  • What is the new behavior (if this is a feature change)?

age_risk function can handle gender-aggregated estimations even when the population_pyramid argument has gender-disaggregated data

Function now checks that if `gender` info is provided it has the same number of elements as `age`
The plot argument in the helping function `graphics::hist` has to be FALSE to avoid attempts of displaying data
The function now can handle the case when users have a populatio_pyramid dissagreggated by gender but still want to estimate an age_risk distribution where genders are aggregated
@juan-umana juan-umana added the bug Something isn't working label Oct 12, 2023
@Juanmontenegro99 Juanmontenegro99 merged commit 3b9d5f7 into dev Oct 12, 2023
1 check passed
@Juanmontenegro99 Juanmontenegro99 deleted the bug-age_risk branch October 12, 2023 22:19
Juanmontenegro99 added a commit that referenced this pull request Oct 13, 2023
* Create test-endemic_channel

* Tests endemic channel (#25)

* #23 create endemic channel test

* #23 update endemic channel assertions

* Update documentation

* Update lint

* Uptade lint

* Update lint

* Update README.md (#27)

* 24 fix incidence historic length handling (#28)

* #24 verify incidence and observations

* #24 Verify length of the incidence historic

* #24 adding warnings and final tests

* Fix warnings

* Fix unused variable

* 26 modify moran index function (#29)

* #26 modified function and test

* Revert "#26 modified function and test"

This reverts commit 52f24b0.

* #26 modified function and test

* Update lint

* Fix lint

* 8 demographics vignette (#32)

* Vignette creation

* Update demographics-vignette.Rmd

* Update demographics-vignette.Rmd

* Actualizar demographics-vignette.Rmd

* Actualizar demographics-vignette.Rmd

* Update demographics-vignette.Rmd

* Update demographics-vignette.Rmd

* Update demographics-vignette.Rmd

* Update of vignette format

* 30 population pyramids age ranges (#31)

* 24 fix incidence historic length handling (#28)

* #24 verify incidence and observations

* #24 Verify length of the incidence historic

* #24 adding warnings and final tests

* Fix warnings

* Fix unused variable

* 26 modify moran index function (#29)

* #26 modified function and test

* Revert "#26 modified function and test"

This reverts commit 52f24b0.

* #26 modified function and test

* Update lint

* Fix lint

* Update demographics.R

* Age ranges feature

Include the feature to customize the age ranges for the population pyramids and specific age rates

* Update

* Create detect_outbreaks_ewma.Rd

---------

Co-authored-by: Juan Montenegro Torres <60274234+Juanmontenegro99@users.noreply.github.com>

* Update demographic_vignette.Rmd

* Update demographic_vignette.Rmd

---------

Co-authored-by: Juan Montenegro Torres <60274234+Juanmontenegro99@users.noreply.github.com>

* Create endemic_channel.Rmd

* Create endemic_channel_figure.png

Figure for the endemic channel vignette

* Update logo

New epiCo logo

* Update README

* Update endemic_channel.Rmd

* Style updates

* Restore dependency on R 3.2.0
because of anyNA()

* Spatiotemporal vignette (#37)

* Create spatiotemporal_vignette.Rmd

* Fix vignettes

* Fix lint errors

* Fix styler

* Temporal fix lint

* upload data

* Update tests and fix age range parameter (#35)

* Update tests and fix age range parameter

* Create project and fix concatenation_linter

* Update vignettes with the new data

* #40

* fix warnings lint

* Fix lint warnings

* fix warnings

* Delete unnecessary files

* Fix lint warnings

* Delete commented code

---------

Co-authored-by: Juan Montenegro Torres <60274234+Juanmontenegro99@users.noreply.github.com>

* 41 fix path bug (#42)

Relocate data and fix #41.

* update moran's example

* Fix bug in morans_index map

Now morans_index function returns a list with the data and the leaflet map that can be displayed later

* Bug age risk (#44)

* Add error handling age_risk

Function now checks that if `gender` info is provided it has the same number of elements as `age`

* Fix age_risk bug

The plot argument in the helping function `graphics::hist` has to be FALSE to avoid attempts of displaying data

* Fix age_risk bug

The function now can handle the case when users have a populatio_pyramid dissagreggated by gender but still want to estimate an age_risk distribution where genders are aggregated

* Style fix

* Delete unnecessary files

* Update test-demographics.R (#47)

* Handle warnings

* Documentation and style changes

* style and documentation changes

* fix lint warnings

---------

Co-authored-by: juan-umana <jd.umana10@uniandes.edu.co>
Co-authored-by: Juan D. Umaña <juan.umanacaro@gmail.com>
Co-authored-by: Juanmontenegro99 <jf.montenegro@uniandes.edu.co>
Co-authored-by: Hugo Gruson <Bisaloo@users.noreply.github.com>
Co-authored-by: Julian Otero <56242573+jd-otero@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants