Description Usage Arguments Value
View source: R/SBM_gibbs_functions.R
Sample uk parameters from their full conditional distributions and then calculate the implied phi parameters
1 | sample.phi(ngroup.spp, gamma.u, burnin, gibbs.step, phi, psi, w)
|
ngroup.spp |
maximum number of groups for species (KS) |
gamma.u |
the truncated stick-breaking prior parameter for species 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 |
phi |
vector of size KS containing the current estimate of phi (i.e., probability of each species group) |
psi |
matrix of size KL x KS containing the current estimate of psi |
w |
vector of length S, storing the current membership of each species |
this function returns a list with 4 items (phi, uk, w, psi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.