Description Usage Arguments Value
Runs the Gibbs sampler and returns samples from the posterior distribution
1 | SBM(dat, ngroup.loc, ngroup.spp, ngibbs, burnin)
|
dat |
matrix has L rows (e.g., locations) and S columns (e.g., species), containing the presence-absence data |
ngroup.loc |
maximum number of location groups (KL) |
ngroup.spp |
maximum number of species groups (KS) |
ngibbs |
number of Gibbs sampler iterations |
burnin |
number of iterations to discard as part of burn-in phase |
this function returns samples from the posterior distribution in the form of a list containing several matrices. These matrices have ngibbs-burnin rows and contain the posterior distribution for:
theta: probability of each location group
phi: probability of each species group
llk: log-likelihood for each iteration
psi: presence probability for each location group and species group
z: cluster assignment of each location
w: cluster assignment of each species
gamma: TSB prior parameters (one for location groups and the other for species groups)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.