-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Adding offset functionality for stan_jm #415
Conversation
This looks really cool @pamelanluna! Thanks! I especially like the introduction of scaling for the association parameter. Is the contribution of the offset in the association structure just zero? One small question, why is the scale_assoc incorporated here, rather than scaling somewhere like here. I'm probably missing the details, but I couldn't work out how the addition of log(scale_assoc) in the linear predictor for Y translated into scaling of the association parameter. Forgive me if I'm missing something simple. If it's passing all the existing tests for the model estimates then I see no issue with merging these changes in. |
Thanks, @sambrilleman! Yes, the offset is excluded/zero in the association structure. The idea here is that if you're adjusting for an offset term in the longitudinal submodel, you will want the adjusted model values in the event submodel. The inclusion of the offset term in the association structure is something that could be made optional, but I couldn't think of a use case where it'd be preferable. I chose to include scale_assoc there because it touched less code, but you've found a bug in how I implemented the scaling. In my models I've been using the muvalue association structure, so scaling the linear predictor by adding log(scale_assoc) worked as expected. I will update the code to fix that issue. |
Great, thanks, sounds good! (Makes sense about scale_assoc -- yeah I had assumed that the implementation was specific to a particular link function). |
@sambrilleman Is this fine with you? |
@pamelanluna Did you end up pushing any commits that meant If not, then we might need to wait until that is done @bgoodri , because I don't think the offset will work with all association structures (atleast that is my interpretation from my earlier message from Feb). |
@sambrilleman No, these latest commits are just incorporating upstream changes into my fork for testing purposes. I am in the process of updating the scaling parameter code to work with other association structures, so these changes should be ready soon. |
@pamelanluna awesome, cheers for the update! 😃 |
@sambrilleman Just wanted to make sure you saw that I had implemented these scaling parameter changes. Let me know if you have any questions or concerns. |
Hi @pamelanluna - sorry for the delay! This looks awesome and neatly done! 😀 A couple of questions:
|
Thanks, @sambrilleman!
|
Awesome, sounds like you are all over it! 😀 Nothing else I can think of then. @bgoodri @jgabry @pamelanluna I am happy for this to get merged if all tests are passing and everyone else is happy with it. |
Thanks @pamelanluna! @sambrilleman I'm definitely happy adding this feature, and if you're happy with the implementation then that's fine by me! |
@sambrilleman All tests are passing for me locally. Let me know if you need anything else from me to move forward with the merge. Thanks! |
@sambrilleman @jgabry @bgoodri Looks like everyone is happy with these changes. Can we get this merged? |
@pamelanluna All good from my end. Will be up to @bgoodri or @jgabry to action the merge, as they are maintainers of the repo. 😀 |
Thanks. |
@pamelanluna Sorry for the delay, I forgot we hadn't merged this. Thanks again for the PR! |
Implements an offset term for the longitudinal submodel. Resolves #405