Description Usage Arguments Value
View source: R/SAM_gibbs_functions.R
This function generates samples of the group assignment variable cs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | sample.cs(
ngroups,
omega,
xmat,
alpha,
betas,
theta,
nspp,
nloc,
InvSigma.precalc,
Sigma.precalc,
lds,
cs,
nparam
)
|
ngroups |
maximum number of species groups (KS) |
omega |
a matrix L x S containing the underlying latent variables omega |
xmat |
the design matrix of dimension L x P |
alpha |
vector of size S with intercept for each species |
betas |
P x KS matrix containing slope parameters for each covariate (row) and each group (column) |
theta |
vector of size KS with the probability of each species group |
nspp |
overall number of species (S) |
nloc |
overall number of locations (L) |
Sigma.precalc |
covariance matrix for new group |
lds |
log of determinant of covariance matrix for new group |
cs |
vector of size S with group assignment for each species |
nparam |
overall number of covariates (P) |
invSigma.precalc |
precision matrix for new group |
a vector of size S with the group assignment variable cs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.