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

a few issues with distributional parameters #224

Open
1 of 2 tasks
jfree-man opened this issue Oct 10, 2024 · 1 comment
Open
1 of 2 tasks

a few issues with distributional parameters #224

jfree-man opened this issue Oct 10, 2024 · 1 comment
Assignees

Comments

@jfree-man
Copy link
Collaborator

jfree-man commented Oct 10, 2024

I have found a couple problems that need to be addressed for distributional parameters.

  • Fitting character distributional parameters - See the second calibration example in example("fit_distr_params") where user specified distributional parameter sd_var received the default transformation but the variable name prevents values from being back transformed in the coefficient table.
    • This also affects setting priors on distributional parameters, see this vignette example here where my_var gets different transformations for each prior term in the objective function.
  • Missing prior location parameter - an absent location parameter for a prior on a parameter doesn't generate a warning or error. See example below. The objective function is missing this prior term but parameters beta and distr_params_sd_beta still show up in the coefficient table.
spec = mp_tmb_library("starter_models", "sir", package = "macpan2")
data = mp_simulator(spec, 50, "infection") |> mp_trajectory()
cal = mp_tmb_calibrator(
    spec
  , data
  , traj = "infection"
  , par = list(beta = mp_normal(sd = mp_fit(0.1)))
  , default = list(beta = 0.25)
)
cal$simulator$tmb_model$obj_fn$obj_fn_expr

mp_optimize(cal)
mp_tmb_coef(cal)
@stevencarlislewalker stevencarlislewalker self-assigned this Oct 11, 2024
@stevencarlislewalker stevencarlislewalker moved this to 🏗 In progress in Roadmap Oct 11, 2024
@stevencarlislewalker
Copy link
Member

I have a fix for "Missing prior location parameter". Testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants