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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5c0bdda
Template for second vignette
athowes May 21, 2024
b056258
Add ebola data and figure
athowes May 22, 2024
38d75ec
Add segments and reference for data
athowes May 23, 2024
d12045d
Better title and cleaning up of data into ptime and stime format
athowes May 23, 2024
cf840c8
Working through the processing of data
athowes May 23, 2024
136ae70
Merge references
athowes Jul 18, 2024
27c4fe4
Use @ for reference
athowes Jul 18, 2024
b47e5b1
More clarity on what's going on in Ebola data preparation section
athowes May 24, 2024
32e5e23
Start with model fitting section
athowes May 24, 2024
59cf3be
Statement of intent about what the vignette might contain
athowes May 27, 2024
76ff40c
Start getting shapefiles for plot / spatial analysis
athowes May 27, 2024
93626df
Figure of SL spatial working
athowes May 27, 2024
445c742
Further writing
athowes May 27, 2024
be928f9
Update introduction writing
athowes May 28, 2024
bebab38
Start to correct Ebola vignette
athowes Jul 12, 2024
6b25161
Trying to line up shapefile chiefdom names
athowes Jul 15, 2024
7c79901
Use districts over chiefdoms, start trying to fit district-sex level …
athowes Aug 6, 2024
dcebc01
Move out things we don't need and start fitting stratified models wit…
athowes Aug 9, 2024
13201bb
Trying out tidybayes
athowes Aug 11, 2024
a6ce8f5
It works!
athowes Aug 11, 2024
8b97f52
Better laying out the things wanted in this vignette
athowes Aug 12, 2024
dfb1b2f
Move library to top, improve plot, add text
athowes Aug 12, 2024
4974272
The small districts are worse, but I still think the priors are wrong
athowes Aug 12, 2024
4f3cab4
Add fitting with gamma
athowes Aug 13, 2024
a905e84
Add column descriptions
athowes Aug 25, 2024
8d99453
Testing prediction tidybayes functions
athowes Aug 25, 2024
7db2230
Replace epidist::epidist by epidist
athowes Aug 26, 2024
64950ce
Improvements to writing, looking at the linear predictors, attempting…
athowes Aug 26, 2024
1a67931
Add sf dependency
athowes Sep 3, 2024
4150074
Lint
athowes Aug 27, 2024
cf412a9
Add modelr to suggests
athowes Sep 3, 2024
318b561
Move fraction, add dplyr:: to select, and create PMF and PDF figures
athowes Aug 27, 2024
caa749e
Add SLE shapefiles
athowes Aug 27, 2024
78044f0
This question is now an issue
athowes Aug 27, 2024
6e58c2e
Remove warnings, make brms silent, filter to only data with >30 point…
athowes Aug 30, 2024
12142e1
Work through more writing in the vignette
athowes Sep 2, 2024
7618141
Lint vignette and aim to make reproducible
athowes Sep 2, 2024
65333a1
Correct error that prevents render
athowes Sep 2, 2024
2339015
Some wording fixes
athowes Sep 3, 2024
5a67961
Remove dplyr:: and put library(dplyr)
athowes Sep 4, 2024
72c239b
Use system.file
athowes Sep 4, 2024
ba22584
Remove modelr:: and tidybayes:: apart from in text
athowes Sep 4, 2024
0a76c6d
Put () after functions to get link in pkgdown
athowes Sep 4, 2024
0dfd33a
Add link to pkgdown header
athowes Sep 4, 2024
f204c8b
Reproduce summary level of rounding inline
athowes Sep 4, 2024
c8b8d38
Moved to issue
athowes Sep 4, 2024
f09ce83
All figures in own chunk
athowes Sep 4, 2024
cbfed76
Move rvars to issue
athowes Sep 4, 2024
48790f7
Fix first x-axis
athowes Sep 4, 2024
fc7b64e
Remove complaining about KDE
athowes Sep 4, 2024
daea0c4
Text update
athowes Sep 5, 2024
9fc06ec
Use "lognormal" not brms::lognormal()
athowes Sep 5, 2024
5678149
Add figure captions to all figures
athowes Sep 5, 2024
a134618
Remove parts about gamma and model comparison
athowes Sep 5, 2024
f45723c
Be specific about the dates
athowes Sep 5, 2024
8cf2918
Improve intercept only text
athowes Sep 5, 2024
59a550a
Comment about lubridate
athowes Sep 5, 2024
7081270
Add comment on ptime and stime
athowes Sep 5, 2024
891e550
Comment on using all available data
athowes Sep 5, 2024
87ee586
Move column descriptions into function roxygen
athowes Sep 6, 2024
4035227
Set all x-axis limits to 30, and set pwindow_upr and swindow_upr to 0…
athowes Sep 6, 2024
5e037d8
More verbose on sex-stratified model
athowes Sep 6, 2024
b0b2854
Note on interpreting the summary
athowes Sep 6, 2024
824ee23
Make introduction shorter
athowes Sep 6, 2024
172e952
Lint package
athowes Sep 6, 2024
22332c7
Collapse plots into a 3 level patchwork (part 1)
athowes Sep 6, 2024
001cf05
Update documentation
athowes Sep 6, 2024
8ea265b
More collapse 3 plots into patchwork
athowes Sep 6, 2024
9a506cf
Correct figure chunk name
athowes Sep 6, 2024
fac7233
Range of improvements to Ebola vignette (sorry for squashed commit me…
athowes Sep 9, 2024
afa7dca
Add head(obs_prep)
athowes Sep 9, 2024
692cfb5
Add patchwork to suggests
athowes Sep 9, 2024
dca3a0b
Don't need sec:
athowes Sep 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ Suggests:
tidyr,
posterior,
fs,
tidybayes
sf,
tidybayes,
modelr,
patchwork
Remotes:
stan-dev/cmdstanr,
Rdatatable/data.table,
Expand Down
14 changes: 14 additions & 0 deletions R/observe.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#' Observation process for primary and secondary events
#'
#' This function adds columns to linelist data representing an observation
#' process with daily primary and secondary censoring, as well as right
#' truncation. The columns added are:
#' * `ptime_daily`: The floor of `ptime`
#' * `ptime_lwr`: The lower bound of `ptime`. Equal to `ptime_daily`
#' * `ptime_upr`: The upper bound of `ptime`. Equal to `ptime_lwr + 1`
#' * `stime_daily`: The floor of `stime`
#' * `stime_lwr`: The lower bound of `stime`. Equal to `stime_daily`
#' * `stime_upr`: The upper bound of `stime`. Equal to `stime_lwr + 1`
#' * `delay_daily`: Given by `stime_daily - ptime_daily`
#' * `delay_lwr`: Given by `delay_daily - 1` (or 0 if `delay_daily < 1`)
#' * `delay_upr`: Given by `delay_daily + 1`
#' * `obs_at`: The maximum value of `stime`
#'
#' @param linelist ...
#' @family observe
#' @autoglobal
Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ navbar:
articles:
text: Articles
menu:
- text: Advanced features with Ebola data
href: articles/ebola.html
- text: Approximate Bayesian inference
href: articles/approx-inference.html

Expand Down
1 change: 1 addition & 0 deletions inst/gadm41_SLE_shp/gadm41_SLE_0.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_0.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions inst/gadm41_SLE_shp/gadm41_SLE_0.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_0.shp
Binary file not shown.
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_0.shx
Binary file not shown.
1 change: 1 addition & 0 deletions inst/gadm41_SLE_shp/gadm41_SLE_1.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_1.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions inst/gadm41_SLE_shp/gadm41_SLE_1.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_1.shp
Binary file not shown.
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_1.shx
Binary file not shown.
1 change: 1 addition & 0 deletions inst/gadm41_SLE_shp/gadm41_SLE_2.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_2.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions inst/gadm41_SLE_shp/gadm41_SLE_2.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_2.shp
Binary file not shown.
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_2.shx
Binary file not shown.
1 change: 1 addition & 0 deletions inst/gadm41_SLE_shp/gadm41_SLE_3.cpg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UTF-8
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_3.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions inst/gadm41_SLE_shp/gadm41_SLE_3.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_3.shp
Binary file not shown.
Binary file added inst/gadm41_SLE_shp/gadm41_SLE_3.shx
Binary file not shown.
16 changes: 15 additions & 1 deletion man/observe_process.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading