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

Issue 48: Ebola vignette #52

Merged
merged 73 commits into from
Sep 9, 2024
Merged

Issue 48: Ebola vignette #52

merged 73 commits into from
Sep 9, 2024

Conversation

athowes
Copy link
Collaborator

@athowes athowes commented May 21, 2024

Description

This PR will close #48. The point of this vignette is to demonstrate some of the more advanced capabilities of the epidist package.

Checklist

  • My PR is based on a package issue and I have explicitly linked it.
  • I have included the target issue or issues in the PR title in the for Issue(s) issue-numbers: PR title
  • I have read the contribution guidelines.
  • I have tested my changes locally.
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required.
  • My code follows the established coding standards.
  • I have added a news item linked to this PR.
  • I have reviewed CI checks for this PR and addressed them as far as I am able.

@athowes athowes changed the title Template for second vignette Issue 48: Ebola vignette May 21, 2024
@athowes athowes force-pushed the second-vignette branch from ee46408 to da80d44 Compare May 23, 2024 21:16
@athowes
Copy link
Collaborator Author

athowes commented May 27, 2024

Did you ever fit different delay distributions by sex or other covariates @seabbs @parksw3 for the ebola data?

That seems like a fun thing to do and would demonstrate some of the functionality of having this brms set-up.

@parksw3
Copy link
Collaborator

parksw3 commented May 29, 2024

We did not. And I agree it would be a really useful demonstration. Currently packing to get ready to move to Canada tomorrow... will engage more after I move...

@seabbs
Copy link
Contributor

seabbs commented May 29, 2024

Agree with both of you that this would be a nice thing to at least plan to do here as its within the functionality of the current package but hasn't been explored but is suggested as a good idea in Charniga et al. I say plan as we need to make sure any current design decisions don't close the door on this but if time also just doing it now would be good.

@athowes
Copy link
Collaborator Author

athowes commented May 30, 2024

Note to self that after working on the in depth model vignette (#66) I am now in more of a position to implement a basic version of the gamma delay into this PR.

@athowes athowes self-assigned this May 30, 2024
@athowes
Copy link
Collaborator Author

athowes commented Jun 6, 2024

Updates based on #70:

  • Can now do gamma
  • Can now do formula for by space or sex more easily
  • Need to update otherwise to be compatible with new function name

@athowes athowes added the active PRs that are being actively worked on label Jun 12, 2024
@athowes athowes mentioned this pull request Jun 12, 2024
9 tasks
@athowes athowes force-pushed the second-vignette branch 2 times, most recently from e4a0c48 to 90215d6 Compare July 18, 2024 08:49
vignettes/ebola.Rmd Outdated Show resolved Hide resolved
vignettes/ebola.Rmd Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.87%. Comparing base (fa1be26) to head (5ab998b).
Report is 61 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #52       +/-   ##
===========================================
+ Coverage   28.49%   46.87%   +18.37%     
===========================================
  Files          10       12        +2     
  Lines         565      576       +11     
===========================================
+ Hits          161      270      +109     
+ Misses        404      306       -98     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@athowes
Copy link
Collaborator Author

athowes commented Sep 6, 2024

Question... does this line list capture all known cases or some kind of subsample? Maybe good to say that early on esp alongside the epi curve for context (also to understand how representative the data are)

I think it's all confirmed and suspected cases from a scan of the paper but not 100% sure.

@athowes athowes mentioned this pull request Sep 9, 2024
12 tasks
Co-authored-by: Katie Gostic (she/her) <[email protected]>
@athowes
Copy link
Collaborator Author

athowes commented Sep 9, 2024

I've incorporated most of your feedback into the vignette. The main thing that helped was just switching to HMC from Laplace (solved the modelling issues). I have also created follow-up issues for:

If this is passing and reasonable, I'd suggest merging this, then I can clean things up in a PR resolving #290. If you have more comments about it then we could put them in there. Reason for this strategy is that this thread has got overwhelming and so I'd like to get the 95% that is done banked then be in a clearer place to resolve any remaining things.

Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to me. Happy that all additional work has been captured in new issues. This reads very nicely as is and I think surfaces some exciting functionality.

@seabbs seabbs merged commit 0b0032e into main Sep 9, 2024
7 checks passed
@seabbs seabbs deleted the second-vignette branch September 9, 2024 16:49
seabbs pushed a commit that referenced this pull request Jan 10, 2025
* Template for second vignette

* Add ebola data and figure

* Add segments and reference for data

* Better title and cleaning up of data into ptime and stime format

* Working through the processing of data

* Merge references

* Use @ for reference

* More clarity on what's going on in Ebola data preparation section

* Start with model fitting section

* Statement of intent about what the vignette might contain

* Start getting shapefiles for plot / spatial analysis

* Figure of SL spatial working

* Further writing

* Update introduction writing

* Start to correct Ebola vignette

* Trying to line up shapefile chiefdom names

* Use districts over chiefdoms, start trying to fit district-sex level delay models

* Move out things we don't need and start fitting stratified models with subsampling and Laplace for now

* Trying out tidybayes

* It works!

* Better laying out the things wanted in this vignette

* Move library to top, improve plot, add text

* The small districts are worse, but I still think the priors are wrong

* Add fitting with gamma

* Add column descriptions

* Testing prediction tidybayes functions

* Replace epidist::epidist by epidist

* Improvements to writing, looking at the linear predictors, attempting to do posterior predictions

* Add sf dependency

* Lint

* Add modelr to suggests

* Move fraction, add dplyr:: to select, and create PMF and PDF figures

* Add SLE shapefiles

* This question is now an issue

* Remove warnings, make brms silent, filter to only data with >30 points, produce all epred and pred figures, add conclusion

* Work through more writing in the vignette

* Lint vignette and aim to make reproducible

* Correct error that prevents render

* Some wording fixes

* Remove dplyr:: and put library(dplyr)

* Use system.file

* Remove modelr:: and tidybayes:: apart from in text

* Put () after functions to get link in pkgdown

* Add link to pkgdown header

* Reproduce summary level of rounding inline

* Moved to issue

* All figures in own chunk

* Move rvars to issue

* Fix first x-axis

* Remove complaining about KDE

* Text update

* Use "lognormal" not brms::lognormal()

* Add figure captions to all figures

* Remove parts about gamma and model comparison

* Be specific about the dates

* Improve intercept only text

Co-authored-by: Katie Gostic (she/her) <[email protected]>

* Comment about lubridate

Co-authored-by: Katie Gostic (she/her) <[email protected]>

* Add comment on ptime and stime

Co-authored-by: Katie Gostic (she/her) <[email protected]>

* Comment on using all available data

* Move column descriptions into function roxygen

* Set all x-axis limits to 30, and set pwindow_upr and swindow_upr to 0 now that it's possible

* More verbose on sex-stratified model

Co-authored-by: Katie Gostic (she/her) <[email protected]>

* Note on interpreting the summary

* Make introduction shorter

* Lint package

* Collapse plots into a 3 level patchwork (part 1)

* Update documentation

* More collapse 3 plots into patchwork

* Correct figure chunk name

* Range of improvements to Ebola vignette (sorry for squashed commit message)

* Add head(obs_prep)

Co-authored-by: Katie Gostic (she/her) <[email protected]>

* Add patchwork to suggests

* Don't need sec:

---------

Co-authored-by: Katie Gostic (she/her) <[email protected]>
Former-commit-id: bef50ccc525ab60a9056617a77b36321b853a8c2 [formerly 7c6d247838dcf265e6a98e230279163ac3d380bc]
Former-commit-id: 2c1fd847cc2c201d2209d7d10f804980d0274c7c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
active PRs that are being actively worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ebola vignette
4 participants