Description Usage Arguments Value
View source: R/SBM_gibbs_functions.R
Sample the vector z containing the membership of each location
1 2 3 4 5 6 7 8 9 10 11 12 13 | sample.z(
ltheta,
dat,
dat1m,
lpsi,
l1mpsi,
ngroup.loc,
ngroup.spp,
nloc,
nspp,
w,
z
)
|
ltheta |
equal to log(theta) |
dat |
L x S matrix, containing the presence-absence data |
dat1m |
L x S matrix, calculated as 1-dat |
lpsi |
equal to log(psi) |
l1mpsi |
equal to log(1-psi) |
ngroup.loc |
maximum number of location groups (KL) |
ngroup.spp |
maximum number of species groups (KS) |
nloc |
total number of locations (L) |
nspp |
total number of species (S) |
w |
vector of length S, storing the current membership of each species |
z |
vector of length L, storing the current membership of each locations |
this function returns a vector of length L containing z
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.