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

Feature missing reference dates preprocessing #106

Merged
merged 54 commits into from
Jul 8, 2022
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f6e2df3
Remove reduce_sum parallelization
adrian-lison May 13, 2022
d288fe2
Add observations with missing reference date
adrian-lison May 13, 2022
6cdf3f2
Add alpha vector
adrian-lison May 15, 2022
6ca4657
Implement random walk prior on logit alpha
adrian-lison May 16, 2022
0e43ede
Simplify non-parallelized obs_lpmf
adrian-lison May 16, 2022
c3350ab
Make alpha doc more generic
adrian-lison May 16, 2022
2864eee
Add first draft of likelihood computation for missing reference dates
adrian-lison May 16, 2022
fa415e9
Implement slicing of likelihood for obs_miss from 1+dmax onwards
adrian-lison May 16, 2022
104efd6
Bugfix obs_lmpf and improve formatting
adrian-lison May 17, 2022
4539e48
Extend generated quantities to cases with missing reference date
adrian-lison May 17, 2022
0db6ce1
Change pp_inf_obs_miss_rep assignment to loop
adrian-lison May 18, 2022
17484d0
Fix typo
adrian-lison Jun 13, 2022
87e57e8
Catch bug if data.table contains column "group"
adrian-lison Jun 13, 2022
bdd2fba
Preprocess missing reference dates
adrian-lison Jun 13, 2022
2343ee9
Add automatic completion of missing reporting dates per group and ref…
adrian-lison Jun 13, 2022
d47c510
Change structure and fix assignment
adrian-lison Jun 13, 2022
4a0b647
Change date range for missing reference dates
adrian-lison Jun 13, 2022
41187e5
Add obs_miss to stan_data_list
adrian-lison Jun 13, 2022
8b68665
Change code comments
adrian-lison Jun 16, 2022
4e43eb7
Move completion to separate function, account for max_date
adrian-lison Jun 16, 2022
275efc8
Adapt obs_miss length from rd to t
adrian-lison Jun 16, 2022
08b8b1f
Correct alpha and obs in stan model
adrian-lison Jun 16, 2022
8add91b
Add priors for alpha
adrian-lison Jun 16, 2022
13759ff
Add support for missing reference dates to enw_retrospective_data
adrian-lison Jun 21, 2022
ac809ac
Fix generated quantities and add code doc
adrian-lison Jun 24, 2022
a48ae0a
Shorten loglik missing array
adrian-lison Jun 24, 2022
ca46036
Streamline grouping parameter of complete_dates and format
adrian-lison Jul 6, 2022
27fd0e7
Streamline groups
adrian-lison Jul 6, 2022
8acaf51
merge in develop
seabbs Jul 7, 2022
a5cfe84
remove updates to stan code for missing reference dates
seabbs Jul 7, 2022
152ffe0
fix merge issues in model.R
seabbs Jul 7, 2022
a7d281c
clean up preprocessing merge issues
seabbs Jul 7, 2022
4b6e2a9
clean up and simplify missing data preprocessing
seabbs Jul 7, 2022
a7adb4b
typos, check issues, grouping optional
seabbs Jul 7, 2022
c04e036
fix edge cases
seabbs Jul 7, 2022
1691726
fix examples
seabbs Jul 7, 2022
eb2866f
add missing data helper fn
seabbs Jul 7, 2022
d6ca26d
lint enw_missing_reference
seabbs Jul 7, 2022
5ebfa0d
add tests for enw_latest_data
seabbs Jul 8, 2022
74e0ef3
refactor enw_missing_reference
seabbs Jul 8, 2022
f8ce677
remove enw_latest_data_inner as no longer needed
seabbs Jul 8, 2022
4322b58
add tests for enw_complete_data
seabbs Jul 8, 2022
ec8b530
add tests for enw_missing_reference
seabbs Jul 8, 2022
750f9c0
fix global variables
seabbs Jul 8, 2022
72cf964
restyle and add news item
seabbs Jul 8, 2022
0243ae1
debug model.R changes
seabbs Jul 8, 2022
327721b
deal with enw_filter_reference_dates issue ignoring reports
seabbs Jul 8, 2022
7c989f7
add new assumptions to the news
seabbs Jul 8, 2022
b6f8ea0
update example data
seabbs Jul 8, 2022
c06d308
deal with bugs due to missingness not being present and add tests
seabbs Jul 8, 2022
3c33d05
update news
seabbs Jul 8, 2022
7fcc6e2
update readme
seabbs Jul 8, 2022
194862e
CRAN check fixes
seabbs Jul 8, 2022
d314b7f
linting
seabbs Jul 8, 2022
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
Prev Previous commit
Next Next commit
update news
  • Loading branch information
seabbs committed Jul 8, 2022
commit 3c33d0599045b68b76ac0a478b65c84343046be2
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This is a major release and contains multiple breaking changes. If needing the o
* A new helper function `enw_delay_metadata()` has been added. This produces metadata about the delay distribution vector that may be helpful in future modelling. This prepares the way for [#4](https://github.com/epiforecasts/epinowcast/issues/4) where this data frame will be combined with the reference metadata in order to build non-parametric hazard reference and delay based models. In addition to adding this function, it has also been added to the output of `enw_preprocess_data()` in order to make the metadata readily available to end-users. See [#80](https://github.com/epiforecasts/epinowcast/pull/80) by [@seabbs](https://github.com/seabbs).
* Two new helper functions `enw_filter_reference_dates()` and `enw_filter_report_dates()` have been added. These replace `enw_retrospective_data()` but allow users to similarly construct retrospective data. Splitting these functions out into components also allows for additional use cases that were not previously possible. Note that by definition it is assumed that a report date for a given reference date must be the equal or greater (i.e a report cannot happen before the event being reported occurs). See [#82](https://github.com/epiforecasts/epinowcast/pull/82) by [@sbfnk](https://github.com/sbfnk) and [@seabbs](https://github.com/seabbs).
* The internal grouping variables have been refactored to reduce the chance of clashes with columns in the data frames supplied by the user. There will also be an error thrown in case of a variable clash, making preprocessing safer. See [#102](https://github.com/epiforecasts/epinowcast/pull/102) by [@adrian-lison](https://github.com/adrian-lison) and [@seabbs](https://github.com/seabbs), which solves [#99](https://github.com/epiforecasts/epinowcast/issues/99).
* Support for preprocessing observations with missing reference dates has been added along with a new data object returned by `enw_preprocess_data()` that highlights this information to the user (alternatively can be accessed by users using `enw_missing_reference()`). In addition, these missing observations have been setup to be passed to stan in order to allow their use in modelling. See
* Support for preprocessing observations with missing reference dates has been added along with a new data object returned by `enw_preprocess_data()` that highlights this information to the user (alternatively can be accessed by users using `enw_missing_reference()`). In addition, these missing observations have been setup to be passed to stan in order to allow their use in modelling. This feature is in prepartion of adding full support for missing observations (see [#43](https://github.com/epiforecasts/epinowcast/issues/43)). See
[#106](https://github.com/epiforecasts/epinowcast/pull/106) by [@adrian-lison](https://github.com/adrian-lison) and [@seabbs](https://github.com/seabbs).

## Model
Expand Down