Skip to content

Compare quantiles when dispersion is equal#5898

Closed
kaitejohnson wants to merge 3 commits intoKITmetricslab:mainfrom
kaitejohnson:compare-quantile-dispersion-equal
Closed

Compare quantiles when dispersion is equal#5898
kaitejohnson wants to merge 3 commits intoKITmetricslab:mainfrom
kaitejohnson:compare-quantile-dispersion-equal

Conversation

@kaitejohnson
Copy link

Using the k = 7 rolling sum, and removing the last column (the 40+ days which are being handled differently in the dispersion estimate than the first 40 days as they are treated as observed, which may or may not be correct), we get the same dispersion parameters using both the KIT nowcast code and the baselinenowcast package.
image

Next, we want to make sure, using those dispersion parameters, we get back the same quantiled nowcast:

We use the KIT code to generate the quantiles using the qnbinom() function, and we used the baselinenowcast package to generate 1000 draws from the negative binomial observation model, combine them with observations, and then compute quantiles in post-processing.

The goal here was to make sure none of the post-processing, when combining the draws across 7-day sums, is behaving differently than we would expect (e.g. due to potential issues in combining the rolling sums of observations and predictions).

This does not appear to be the case. Though there are the slightest differences here, these seem more likely to be attributable to the stochastic nature of the draws vs the analytical computation of the quantiles in the KIT simple nowcast method
image

This gives us confidence that the baselinenowcast method is doing this post processing as we would expect it to.

@kaitejohnson
Copy link
Author

Sorry all -- meant to open a PR into my own fork!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant