wjakethompson / measr

R package for the Bayesian estimation of diagnostic classification models using Stan
https://measr.info
GNU General Public License v3.0
8 stars 3 forks source link

Improvements to prior specifications #15

Closed wjakethompson closed 1 year ago

wjakethompson commented 1 year ago

This pull request does two things:

  1. Add functionality for users to specify a prior distribution for the base rate of class membership (Vc) and makes the default uniform dirichlet prior explicit when no user prior is provided (closes #2)
  2. Puts safeguards around the specification of priors (closes #1). Specifically, an error will now be thrown if you try to specify a class or coefficient that isn't included in the chosen model (e.g., specifying a prior for slipping parameters when estimating the LCDM).
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.07 :tada:

Comparison is base (1519a1f) 96.30% compared to head (f75cd85) 96.38%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #15 +/- ## ========================================== + Coverage 96.30% 96.38% +0.07% ========================================== Files 28 29 +1 Lines 2004 2046 +42 ========================================== + Hits 1930 1972 +42 Misses 74 74 ``` | [Impacted Files](https://codecov.io/gh/wjakethompson/measr/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson) | Coverage Δ | | |---|---|---| | [R/data-checks.R](https://codecov.io/gh/wjakethompson/measr/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson#diff-Ui9kYXRhLWNoZWNrcy5S) | `100.00% <100.00%> (ø)` | | | [R/extract.R](https://codecov.io/gh/wjakethompson/measr/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson#diff-Ui9leHRyYWN0LlI=) | `100.00% <100.00%> (ø)` | | | [R/fit-dcm.R](https://codecov.io/gh/wjakethompson/measr/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson#diff-Ui9maXQtZGNtLlI=) | `91.30% <100.00%> (+0.12%)` | :arrow_up: | | [R/measr-package.R](https://codecov.io/gh/wjakethompson/measr/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson#diff-Ui9tZWFzci1wYWNrYWdlLlI=) | `100.00% <100.00%> (ø)` | | | [R/priors.R](https://codecov.io/gh/wjakethompson/measr/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson#diff-Ui9wcmlvcnMuUg==) | `100.00% <100.00%> (ø)` | | | [R/stan-dina.R](https://codecov.io/gh/wjakethompson/measr/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson#diff-Ui9zdGFuLWRpbmEuUg==) | `100.00% <100.00%> (ø)` | | | [R/stan-lcdm.R](https://codecov.io/gh/wjakethompson/measr/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson#diff-Ui9zdGFuLWxjZG0uUg==) | `100.00% <100.00%> (ø)` | | | [R/utils.R](https://codecov.io/gh/wjakethompson/measr/pull/15?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson#diff-Ui91dGlscy5S) | `95.18% <100.00%> (+0.18%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.