Hi all,
I thought I'd try and clarify matters on the I(,) construct/notation. The main
reason for the confusion appears to be the subtle difference between
truncation and censoring. Put simply, truncation is a modelling assumption, i.e.
it represents a belief about the system being modelled, such as measured drug
concentrations should be positive. Censoring, on the other hand, represents an
observation, e.g. some drug concentration has been observed to be less that 1
mg/L, say. A simple way to determine which assumption is appropriate in a
given setting is to think “would I want to make the same assumption if
predicting a new observation?” If yes, then you probably want to truncate; if
no, you probably want to use I(,). If truncation is the appropriate assumption,
i.e. you wish to actually apply some kind of constraint, then, in general, you
should *not* use I(,). However, as discussed below, you can get away with it
in certain circumstances. First, though, I’ll illustrate what the problem is…
Imagine the following situation
for (i in 1:n) {theta[i] ~ dnorm(mu, tau)}
where mu and tau are unknown parameters, and the thetas should all be
positive, not because they have been observed to be positive (when negative
values are permissible) but because negative values simply don’t make sense in
the given setting. Hence truncation is appropriate (we would also want to
apply the same constraint if predicting a new theta). If one applies I(0, ) to
the distribution above, this simply has the effect of ensuring that no negative
values will be sampled for any of the thetas, which is what we want in either
case! But, now consider what happens when sampling mu and tau… First note
that BUGS does not modify the sampling distributions for mu and tau in any way
if we use I(,) above. If the appropriate assumption is truncation, then the
correct contribution from each theta[i] to the likelihoods for mu and tau is not
dnorm(mu, tau) but dnorm(mu, tau)/const, where const is the integral of
dnorm(mu, tau) between theta = 0 and theta = infinity (so that the density for
each theta integrates to 1). This normalizing constant (const) is a complex
function of both mu and tau, but BUGS is ignoring this (potentially) important
contribution to the full conditional distributions of mu and tau. Hence the
sampling for mu and tau will be wrong!
So, back to when we can get away with using I(,) for truncation… Basically,
this is ok when the parameters of the distribution to be truncated are known,
because it is only they that would otherwise have been sampled incorrectly – if
they are known then they are not sampled anyway.
Best wishes,
Dave Lunn
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|