Description Usage Arguments Value
View source: R/SBM_gibbs_functions.R
Sample vk parameters from their full conditional distributions and convert these vk parameters into theta parameters
1 | sample.theta(ngroup.loc, gamma.v, burnin, gibbs.step, theta, psi, z)
|
ngroup.loc |
maximum number of groups for locations (KL) |
gamma.v |
truncated stick-breaking prior parameter for the location groups. This value should be between 0 and 1, and small values enforce more parsimonius results (i.e., fewer groups) |
burnin |
number of MCMC samples that are going to be thrown out as part of the burn-in phrase |
gibbs.step |
current iteration of the gibbs sampler |
theta |
vector of size KL containing the current estimate of theta (i.e., probability of each location group) |
psi |
KL x KS matrix containing the current estimate of psi |
z |
this is a vector of length L, storing the current membership of each location |
this function returns a list containing 4 items (theta, vk, psi, and z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.