I am trying to implement an operation identified previously here in the context of a “bym2” model:
Specifically, I am trying to adjust/account for a “summary statistic” which in STAN is permitted via a direct manipulation of the joint log density (“target”):
target += -0.5 * dot_self(phi[node1] - phi[node2])
I understand this is not a supported operation in greta. From looking at similar questions, it seems I would need to create a new distribution as indicated by:
and possibly use “greta.funprior” as identified here:
Sadly, this is beyond my poor abilities. Would any of you be aware of a better solution or, provide more guidance on how I might try to get this done?