sample.theta.sam: Sample theta

Description Usage Arguments Value

View source: R/SAM_gibbs_functions.R

Description

This function generates a sample of the vector of probabilities associated with each species group

Usage

1
sample.theta.sam(cs, ngroups, gamma, burnin, gibbs.step, betas, theta)

Arguments

cs

vector of size S with group assignment for each species

ngroups

maximum number of species groups (KS)

gamma

the parameter for the stick-breaking prior

burnin

number of iterations to discard as part of burn-in phase

gibbs.step

current iteration of the gibbs sampler

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

Value

a list of 4 items (theta,betas,cs,v)


drvalle1/EcoCluster documentation built on Jan. 25, 2022, 12:46 a.m.