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

Arbitrary complex inputs to the model #17

Open
DING219 opened this issue Nov 15, 2024 · 3 comments
Open

Arbitrary complex inputs to the model #17

DING219 opened this issue Nov 15, 2024 · 3 comments

Comments

@DING219
Copy link

DING219 commented Nov 15, 2024

Hi, I'm so excited to use your updated package to fit the data. Thank you for your recent works.

I have ever used the pmcmc_parameters() function to insert the weather data into the model (you named "transform" function in "mcstate" package).

Is there a similar function in the "monty" package, or it could be realized through parameter setting?

@edknock
Copy link
Contributor

edknock commented Nov 18, 2024

Hi, what you'll want to use is a "packer" - this is the monty equivalent of mcstate's "transform" function.

https://mrc-ide.github.io/monty/reference/monty_packer.html

It sounds like you'll want to include your weather data within the fixed input when building your packer - the above page should be helpful, with explanations and examples on how to build and use your packer.

@DING219
Copy link
Author

DING219 commented Dec 10, 2024

Thank you so much for your kindly reply.
When I try to insert the weather data, I found that I can't use an index to indicate the calculation of specified step on weather data (like the code " update(time) <- (step + 1) * dt " did in odin.dust package, I have ever used something like "weather_data[step+1]*beta" ).
Is there still have something like "step" to indicate the updated time varying data?

@edknock
Copy link
Contributor

edknock commented Dec 10, 2024

Systems are no longer run by increasing step by increments of 1 (any usage of step is forbidden now), instead they now increase time by increments of dt where dt is now a special parameter (see the migration docs here)
https://mrc-ide.github.io/odin2/articles/migrating.html#discrete-time-models-have-a-more-solid-time-basis

For what you are trying to do, we would now recommend making use of the interpolate function
https://mrc-ide.github.io/odin2/articles/functions.html?q=interpolate#interpolation
For examples of how to use this, see here in the odin-monty book
https://mrc-ide.github.io/odin-monty/interpolation.html#using-interpolation-functions

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

No branches or pull requests

2 participants