sum_mcmc_bspbss {BSPBSS}R Documentation

Summarization of the MCMC result.

Description

The function summarizes the MCMC results obtained from mcmc_bspbss.

Usage

sum_mcmc_bspbss(res, X, kernel, start = 1, end = 100, select_prob = 0.8)

Arguments

res

List including MCMC samples, which can be obtained from function mcmc_bspbss

X

Original data matrix.

kernel

List including eigenvalues and eigenfunctions of the kernel, see init_bspbss.

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.

Value

List that contains the following terms:

S

Estimated latent sources.

pip

Voxel-wise posterior inclusion probability for the latent sources.

A

Estimated mixing coefficent matrix.

zeta

Estimated zeta.

sigma

Estimated sigma.

logLik

Trace of log-likelihood.

Slist

MCMC samples of S.

Examples


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)


[Package BSPBSS version 1.0.5 Index]