-
Notifications
You must be signed in to change notification settings - Fork 5
Use {simulist} in individual level data vignette #188
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
base: main
Are you sure you want to change the base?
Conversation
…ndividual_data vignette
…e in estimate_from_individual_data vignette
|
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
|
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
adamkucharski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting together. I've pushed a couple of tweaks:
- Made delays more clearly different with smaller s.d.
- Added a condition in the
cfr_estimate_unadjustedcalculation to only include onsets that have occurred beforemax_obs(otherwise this method will outperform because it can effecitvely see the future).
|
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
|
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
|
This pull request:
Reach out on slack ( (Note that results may be inaccurate if you branched from an outdated version of the target branch.) |
|
Thanks for reviewing @adamkucharski. I think this can now be merged. One question from the change you pushed, it looks like the addition of Can you let me know if you've seen outcome dates after the maximum observation date? As this might require a change in {simulist}. |
|
I get total_deaths = 25 with that additional conditional and 33 without. total_outcomes = 115 with conditional and 284 without (i.e. the simple calculation with known outcomes is unbiased without that conditional, which it shouldn't be in real-time if the delays are different). This is with simulist version 0.5.0. I think the issue is that the truncation sets |
|
Yes that's the case with {simulist} v0.5.0. I've fixed this in the development version of {simulist} on GitHub (v0.5.0.9000). I'll release a new version of {simulist} at the end of this week and then we can merge this PR and remove the added inequality check. |
This PR updates the
estimate_from_individual_data.Rmdvignette to use {simulist} to simplify the simulation step and use the truncation functionality to correctly truncate the data.It also updates the plot of onset and outcome delay by including cases that have symptom onset before the truncation date but do not yet have an outcome (right censored).
In text R code is added to ensure the case fatality risk (CFR) estimates exactly match and are kept up-to-date with the code chunks.
{simulist} is added as a suggested dependency for use in the vignettes. Note this uses the GitHub version of {simulist} so this will need changing once the new version of {simulist} is released on CRAN.