Replies: 6 comments
-
|
Beta Was this translation helpful? Give feedback.
-
A bit different yeah. The example I was taught to learn offsets in poisson models was the case of modelling shark attacks where you want to account for (human) population growth as well. So instead of just modelling the number of attacks you model the number of attacks per capita which makes the model actually I had a go at trying to tweak some of the jags code output by the mcp model and this is how I included it:
The only change being the line adding |
Beta Was this translation helpful? Give feedback.
-
OK, I see. Thanks for the explanation! Yes, this would be possible to add, but I'll close it for now and will reconsider if it's requested by more people. It would add complexity to places I'd like to keep as clean as possible :-) For now, to make plotting, predictions, etc. work, in v0.3 simply modify the fit$simulate() function with the updated formula too. It basically mirrors the JAGS code, so it should be easy. Save in place. This function is used by In the upcoming v0.4+, one would need to modify |
Beta Was this translation helpful? Give feedback.
-
Ok thank you for the pointer and understandable about keeping the code clean!. Is there a way to pass an extra variable to the jags code? When I try just changing the jags_code itself I get an error because
|
Beta Was this translation helpful? Give feedback.
-
Ah, that raises the ability to write custom models to a level where I reaised an issue :-) See #116. It'll likely be another ½ year or so before I get to that. For now, here are two solutions (not tested). Let me know if any of them works for you! Run it directly using
|
Beta Was this translation helpful? Give feedback.
-
Awesome. Thank you for all your help! |
Beta Was this translation helpful? Give feedback.
-
I'm trying to fit a Poisson change point model with an offset and I seem to have run into a problem with how to set up the model with the offset. Is this possible to do with mcp?
Here is an example model fit with mcp and glm where when including the offset there should be no change-point at 3 but without the offset there is.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions