joshwlambert / epiparameterReportingGuidance

https://joshwlambert.github.io/epiparameterReportingGuidance/
Other
1 stars 0 forks source link

Incubation period #6

Closed ruthmccabe closed 2 weeks ago

ruthmccabe commented 3 weeks ago

Incubation period analysis: issue of only reporting summary statistics and so can't get uncertainty around the 95% quantile, which is important for contact tracing (might overlap with Sangeeta's)

joshwlambert commented 3 weeks ago

Thanks @ruthmccabe this is a great example.

I wonder whether we can better show the missed uncertainty at the 95th quantile on the plot. Maybe plotting the CDF instead of the PDF could do this and a vertical line at the 95% uncertainty and then a shaded area showing the mean and uncertainty at the 95% quantile. Maybe something like Fig. 2 in Linton et al. https://www.mdpi.com/2077-0383/9/2/538.

Let me know what you think and if you don't have time I can have a go at making these changes.

It would also be good to reduce the text (as we spoke about this morning) but this can be done at a later date.

joshwlambert commented 3 weeks ago

This is looking great, thanks for incorporating the suggestions @ruthmccabe. Please let me know if you're happy for me to merge this and include it in the manuscript?

joshwlambert commented 3 weeks ago

The point of this use case is to highlight the lack of uncertainty around the 95th quantile of the distribution when the mean and SD (+ CI) are reported. But can the CI of the 95th quantile be approximated (or even exactly calculated) via the CI of the mean and SD?

# Mean: 12.77 (95% CI 9.39 - 15.94)
# SD: 13.45 (95% CI 8.89 - 17.11)
# 95% quantile: 39.7 (95% CI 28 - 49.1)

max_params <- epiparameter::convert_summary_stats_to_params("gamma", mean = 15.94, sd = 17.11)
max_params
#> $shape
#> [1] 0.8679138
#> 
#> $scale
#> [1] 18.36588
qgamma(p = 0.95, shape = max_params$shape, scale = max_params$scale)
#> [1] 50.21966

min_params <- epiparameter::convert_summary_stats_to_params("gamma", mean = 9.39, sd = 8.89)
min_params
#> $shape
#> [1] 1.115649
#> 
#> $scale
#> [1] 8.416624
qgamma(p = 0.95, shape = min_params$shape, scale = min_params$scale)
#> [1] 27.06851

Created on 2024-09-30 with reprex v2.1.0

In this case would reporting the distribution parameters and their uncertainty help get a better estimate of the 95th quantile uncertainty, given the parameters can be analytically calculated from the mean and SD?