sum_mcmc_bspbss {BSPBSS} | R Documentation |
The function summarizes the MCMC results obtained from mcmc_bspbss
.
sum_mcmc_bspbss(res, X, kernel, start = 1, end = 100, select_prob = 0.8)
res |
List including MCMC samples, which can be obtained from function |
X |
Original data matrix. |
kernel |
List including eigenvalues and eigenfunctions of the kernel, see |
start |
Start point of the iterations being summarized. |
end |
End point of the iterations being summarized. |
select_prob |
Lower bound of the posterior inclusion probability required when summarizing the samples of latent sources. |
List that contains the following terms:
Estimated latent sources.
Voxel-wise posterior inclusion probability for the latent sources.
Estimated mixing coefficent matrix.
Estimated zeta.
Estimated sigma.
Trace of log-likelihood.
MCMC samples of S.
sim = sim_2Dimage(length = 30, sigma = 5e-4, n = 30, smooth = 6)
ini = init_bspbss(sim$X, sim$coords, q = 3, ker_par = c(0.1,50), num_eigen = 50)
res = mcmc_bspbss(ini$X,ini$init,ini$prior,ini$kernel,n.iter=200,n.burn_in=100,thin=10,show_step=50)
res_sum = sum_mcmc_bspbss(res, ini$X, ini$kernel, start = 11, end = 20, select_p = 0.5)