In article <[EMAIL PROTECTED]>,
nicolexz <[EMAIL PROTECTED]> wrote:
>I need to sample a random variable from truncated distribution
>everytime in MCMC. Suppose, the upper (a) and lower (b) bounds are
>far from the location parameter (c) and the scale parameter is
>relatively small, i.e,. b<=a<=c, and c is far greater than a and b.
>The chance to sample using slice sampling is trivival. It's almost
>impossible to sample it from such a truncated distribution. However,
>the problem is quite often in some cases. What should I do in dealing
>with this scenario?
Consider sampling from the truncated normal (0,1) distribution,
truncated at u and v. A non-optimal method is to use the same
truncation points on a distribution whose density is f(x)/3,
where
f(x) = 1, -1<=x<=1
f(x) = 2(x+1), x<=-1
f(x) = 2(x-1), 1<=x
and accept if a test exponential variable T satisfies
T - ln(f(x)) - (x^2)/2 > 0, saving T if it does, and
rejecting otherwise. Truncated procedures can be based
on this. However, if the range is outside the interval
(-2,2), this is not too good. If the range is u to v,
where 2 < u < v, a crude method is to let x - u have
a truncated exponential distribution with density
u*exp(-uz), and accept if T - (z^2)/2 > 0.
--
This address is for information only. I do not claim that these views
are those of the Statistics Department or of Purdue University.
Herman Rubin, Department of Statistics, Purdue University
[EMAIL PROTECTED] Phone: (765)494-6054 FAX: (765)494-0558
.
.
=================================================================
Instructions for joining and leaving this list, remarks about the
problem of INAPPROPRIATE MESSAGES, and archives are available at:
. http://jse.stat.ncsu.edu/ .
=================================================================