Slice sampling for multivariate distribution?

3 次查看(过去 30 天)
How to write a joint probability density function for the slice sampler? I have 15 dimensions [x1, x2, x3,..., x15] for the PDF, and the first 12 dimensions can be specified by certain bounded uniform priors, and the last 3 dimensions can be specified by Beta(2,20). If I independently slice sample the 13 dimensions, I can use:
Posterior{1} = slicesample(x0(1), nsamples, 'pdf', @(x) unifpdf(x,0,200)); Posterior{2} = slicesample(x0(2), nsamples, 'pdf', @(x) unifpdf(x,-0.1,0.1)); etc. for the first 12 dimensions, where x0 is the set of initial values.
And Posterior{i} = slicesample(x0(i), nsamples, 'pdf', @(x) betapdf(x,2,20)); for the last 3 "Beta" dimensions, where i = 13, 14, 15.
However, I wonder if I can write a joint PDF to draw slice samples from the joint PDF directly. For example, I want 44000 samples. I am just puzzled about how to write the @ function for the PDF using so many dimensions.

回答(1 个)

Piyush Mehta
Piyush Mehta 2019-7-12
Yinan,
I struck with the same problem. Were you were able to figure out solution? I have only twodimensions.
Thank you.

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by