Add prior for adding detection priors#60
Merged
TimothyWillard merged 1 commit intomainfrom Nov 12, 2025
Merged
Conversation
0aab767 to
1b494df
Compare
Added `prior` function and associated helpers/shortcuts for adding a parameterization to the detection rate priors to a severity estimate model. - Added `SeverityEstimate::prior` function to add beta distribution parameterizations for passive and active detection rates. - Added `active_prior`, `passive_asymptomatic_prior`, and `passive_symptomatic_prior` as light convenience wrappers for `prior`. - Added 'active_prior', 'passive_asymptomatic_prior', 'passive_symptomatic_prior' slots to `SeverityEstimateModel` class for holding these parametrizations. Represented as a numeric with names 'alpha' and 'beta'. - Added a check to the `beta_parameterization` function for bounds on the variance, 'var' or 'sd' with respect to the mean when using 'mean'/'var' or 'sd' parameterizations. Without this check this function could return negative values without error. Closes #48.
1b494df to
9998b46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
priorfunction and associated helpers/shortcuts for adding a parameterization to the detection rate priors to a severity estimate model.SeverityEstimate::priorfunction to add beta distribution parameterizations for passive and active detection rates.active_prior,passive_asymptomatic_prior, andpassive_symptomatic_prioras light convenience wrappers forprior.SeverityEstimateModelclass for holding these parametrizations. Represented as a numeric with names 'alpha' and 'beta'.beta_parameterizationfunction for bounds on the variance, 'var' or 'sd' with respect to the mean when using 'mean'/'var' or 'sd' parameterizations. Without this check this function could return negative values without error.Closes #48.