-
Notifications
You must be signed in to change notification settings - Fork 19
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Poisson change-point with offset? #115
Comments
|
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 |
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 |
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
|
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
|
Awesome. Thank you for all your help! |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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!
The text was updated successfully, but these errors were encountered: