An excellent suggestion from Serguei Smirnov
------------- Begin Forwarded Message -------------
Delivery-date: Fri, 14 Sep 2001 13:05:57 +0100
Date: Sun, 23 Sep 2001 23:01:51 +1100
From: "Serguei N.Smirnov" <[log in to unmask]>
X-Priority: 3 (Normal)
I suggest an alternative approach to
handling "user defined" distribution. This may be done
by "zeros" and exponential trick. An advantage of this
approach it does not require a fall into interval
from zero to one for the density value,
so "constant of proportionality" is not necessary.
Bernoulli trick (see WinBUGS manual):
for (i in 1:n){
ones[i] <- 1
ones[i] ~ dbern( p[i] )
p[i] <- f(y[i],t) / K
}
proposed Exponential trick:
for (i in 1:n){
zeros[i] <- 0
zeros[i] ~ dexp( lambda[i] )
lambda[i] <- f(y[i],t)
}
In this case may be problems related with log-concavity of
user's distribution
Best,
------------- End Forwarded Message -------------
-------------------------------------------------------------------
To mail the BUGS list, mail to [log in to unmask]
You can search old messages at www.jiscmail.ac.uk/lists/bugs.html
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
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]
|