Open n-kall opened 1 year ago
Yes this would be a good addition! Have you done anything related to this yet? If not, I could also work on this. Do you think it makes sense as a first step to return the weights as part of a separate "iwmm" object (even though there is no such thing yet concretely) in addition to the brmsfit object?
An iwmm object sounds quite useful! I haven't started anything related to this, so feel free if you have time
It looks like you've made a lot of progress with the brmsfit method and the iwmm object. I'm trying to improve the workflow in priorsense for brmsfit objects so I'm happy to help out with this. Would it make sense for me to work from the brmsfit-method branch?
It looks like you've made a lot of progress with the brmsfit method and the iwmm object. I'm trying to improve the workflow in priorsense for brmsfit objects so I'm happy to help out with this. Would it make sense for me to work from the brmsfit-method branch?
Yes the basic structure is there, but it's still missing the part to update the brmsfit object. If you want, feel free to continue from that!
The iwmm object is still sort of a prototype, and is expected to change. If you have any ideas how to structure it, for example to benefit priorsense, please let me know :slightly_smiling_face:
I think it would be good to have a
moment_match.brmsfit
method. It should probably return a modifiedbrmsfit
object with the draws replaced with the moment matched draws, so that further functions from brms would work (e.g.posterior_predict
, see n-kall/priorsense#18). I'm not sure where the weights would be stored though. At some stage I think brms will store the posterior indraws
format (rather than the currentstanfit
object), so that would help, but that will likely only happen in the next major release.