-
Notifications
You must be signed in to change notification settings - Fork 33
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
Use natural parameters when specifying uncertain distributions #893
base: main
Are you sure you want to change the base?
Conversation
@sbfnk I'm getting this error in the CI. Is this not allowed or do we need to update the checks in library(EpiNow2)
#>
#> Attaching package: 'EpiNow2'
#> The following object is masked from 'package:stats':
#>
#> Gamma
try(
delay_opts(
LogNormal(
meanlog = EpiNow2::Fixed(2),
sdlog = EpiNow2::Fixed(1),
max = 10
)
)
)
#> Error in check_stan_delay(dist) :
#> ! Delay distributions passed to the model need to have parameters that
#> are either numeric or normally distributed with numeric parameters and
#> infinite maximum. Created on 2024-12-12 with reprex v2.1.1 |
I think it's as the error says - either has to be numeric or Normal. We could extend this to a Fixed distribution, I don't feel strongly either way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original issue only suggested doing this for parameterisations with uncertainty to avoid the warning. For fixed parameters there is no issue - perhaps keep these as they are?
There are a few instances of examples not yet captured here, e.g. various in dist_spec.r
and for delay_opts()
and the vignettes. I think a full-text search for "mean = Normal" will get most of them.
9aeb71c
to
78f0800
Compare
8e39c18
to
6b0140f
Compare
Description
This PR closes #870. I switch all uncertain parameters expressed in using the unnatural parameters to the natural ones and align the accompanying text.
Initial submission checklist
devtools::test()
anddevtools::check()
).devtools::document()
).lintr::lint_package()
).After the initial Pull Request