On 11 Apr 2004 16:36:05 -0700, [EMAIL PROTECTED] (nicolexz) 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?
Is this the problem. You want to sample a normal z in the range of (say) 2.0 to 2.1, with probability proportionate to the density. Okay, here is what comes to mind. A trapezoid gives a good approximation to the area under the curve. Map the random uniform (0,1) to the area and compute the z that gives that cumulative fraction. -- Rich Ulrich, [EMAIL PROTECTED] http://www.pitt.edu/~wpilib/index.html . . ================================================================= Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at: . http://jse.stat.ncsu.edu/ . =================================================================
