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

Bug fix: Iterations vs. warmup #16

Closed wjakethompson closed 1 year ago

wjakethompson commented 1 year ago

Fixes an edge case for backend = "rstan" where a user could specify a number of iterations using iter, but not specify warmup. In this case, warmup would default to 2000. However, if the specified iter was less than 2000, this would cause rstan to throw an error. Now, if only iter is specified, warmup defaults to iter / 2, as in rstan::sampling().

This closes #6.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (c2e34a8) 96.38% compared to head (5ae4ce4) 96.38%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #16 +/- ## ======================================= Coverage 96.38% 96.38% ======================================= Files 29 29 Lines 2046 2049 +3 ======================================= + Hits 1972 1975 +3 Misses 74 74 ``` | [Impacted Files](https://codecov.io/gh/wjakethompson/measr/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson) | Coverage Δ | | |---|---|---| | [R/stan-utils.R](https://codecov.io/gh/wjakethompson/measr/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jake+Thompson#diff-Ui9zdGFuLXV0aWxzLlI=) | `84.15% <100.00%> (+0.48%)` | :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.