2
$\begingroup$

I am trying to model a function of observed data in JAGS. For example

   x[i,t]/phi ~ dpois(mu)

where x is observed and phi is a parameter in the model. I can't seem to get this working and am wondering if I may be missing some larger issue in JAGS. I am pretty sure you can't have any transformation of the data in the model statement and need to use a data block but that doesn't seem to be dynamic, thus not allowing for me to fit phi.

Any ideas?

$\endgroup$
3
  • $\begingroup$ Can you please add the formulas for your model? $\endgroup$
    – teucer
    Commented Nov 7, 2011 at 10:23
  • $\begingroup$ it is a pretty convoluted model and I think it will complicate the question. Is my question unclear? $\endgroup$
    – scottyaz
    Commented Nov 7, 2011 at 11:24
  • 3
    $\begingroup$ I believe you cannot fit the model that you have described: to my knowledge in JAGS you are not able to scale a distribution. What distribution $\phi$ is supposed to follow? If it is simple enough, you can derive the distribution of $x$ directly and sample from it. $\endgroup$
    – teucer
    Commented Nov 7, 2011 at 11:48

1 Answer 1

3
$\begingroup$

So here the answer from the comment:

I believe there is no way to directly sample from a scaled distribution in JAGS, except the cases where the scaled distribution can be expressed as a standard distribution.

This being said there is trick, the so called "zero trick", but I have not used it so far. It might be useful in your case...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.