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

Move mean to parameter for negative binomial in DB #380

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

joshwlambert
Copy link
Member

This PR moves the mean and any uncertainty around the mean from the summary statistics object to the parameters object in the JSON database (parameters.json). This is to consolidate what is considered a parameter or summary statistic in the package (matching is_epiparameter_params()), see also #379.

The JSON schema is updated to explicitly check if the mean, standard deviation and dispersion are being specified correctly depending on the probability distribution. For normal and negative binomial distributions, these should be specified as parameters, whereas for other distributions, e.g. lognormal, they should be specified as summary statistics.

@joshwlambert
Copy link
Member Author

The validate-json workflow is updated to turn off strict schema checking (strict = FALSE). This is due to the distribution specific checking requiring parameters (with "required":) but the definition of the parameter being in a different scope. See ajv-validator/ajv#1571.

@joshwlambert
Copy link
Member Author

The R-CMD-check is not passing on the PR due to failing a unit test checking for a match between the epiparameter library stored in the package (sysdata) and regenerating the library from the JSON database. This is part of ongoing work in other branches so I will merge this now and then fix the check in an upcoming PR when other changes have also been merged.

@joshwlambert joshwlambert merged commit ce7484a into main Sep 23, 2024
3 of 8 checks passed
@joshwlambert joshwlambert deleted the mean-as-param-db branch September 23, 2024 12:39
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