Description Usage Arguments Value
View source: R/SBM_gibbs_functions.R
Sample the vector w containing the membership of each species
1 2 3 4 5 6 7 8 9 10 11 12 13 | sample.w(
lphi,
dat,
dat1m,
lpsi,
l1mpsi,
ngroup.spp,
ngroup.loc,
nloc,
nspp,
w,
z
)
|
lphi |
equal to log(phi) |
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.spp |
thismaximum number of species groups (KS) |
ngroup.loc |
maximum number of location groups (KL) |
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 S containing w
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.