jackman.stanford.edu/blog
observations on politics, statistics, computing...

cut in JAGS?

Wednesday May 13, 2009

Filed under: computing, statistics — jackman @ 3:58 pm

Will Bullock asks:

Offhand, do you know if there’s a way in JAGS to replicate the cut() function that’s available in WinBUGS (page 40)? I’m trying to estimate two separate models within the same JAGS model, with the parameter estimates from the first model being used to produce the data values for the second model. Without something akin to the cut() function, estimation of the second model will affect estimation of the first model, which I don’t want.

And I replied:

I don’t know for sure. It is a good question. I tend to think not, but a good look at the JAGS manual is called for. there is a lot there…

can the data{} block help you? Martyn talks about at p30 of the JAGS manual. if you had the parameters of a posterior density for, from a previous run, you could put those in the data step. but I think that is about as close as you can get.

And then there is the whole issue of whether you want to be doing “cut” at all… Even the WinBUGS authors seem a little ambivalent about it. I’ve done things with it; e.g., measurement models where you want to separate the “measurement” model from some “downstream” model in which the latent quantity being measured appears as a predictor of something else, say, z. But if you believe the model, then z should be allowed to contribute information to the latent stuff being measured, in general (imho).

Comments (1)

1 Comment

  1. The WinBUGS cut function can be implemented in JAGS as an “observable function”, i.e. a deterministic distribution that creates a likelihood (such as the existing dinterval and dsum distributions). The likelihood generated by a cut distribution is always zero – this is how the “feedback” is stopped. Then you need a sampler that identifies cut distributions and updates them by forward sampling.

    However, as Simon points out, the real question is do you really want to do this? I’ve been fascinated by cuts ever since I saw Nicky Best’s talk on them at the IceBUGS meeting in 2004 (https://openbugs.info/secure/moin/IceBUGS/Abstracts). We have been working on them more intensively over the last year or so and are slowly inching towards an understanding of what they do. We are currently writing up our findings.

    One thing I am convinced of is that cuts as currently implemented in WinBUGS (or in JAGS, as outlined about) do not converge to a well-defined probability distribution, so are best avoided for the time being.

    Comment by Martyn — Monday June 1, 2009 @ 8:21 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress

Bad Behavior has blocked 397 access attempts in the last 7 days.