update.theta: Samples theta and v parameters

Description Usage Arguments Value

View source: R/mixture_gibbs_functions.R

Description

This function samples the v parameters, which are then used to calculate the theta parameters

Usage

1
2
## S3 method for class 'theta'
update(z, ngroup, gamma1, burnin, gibbs.step, theta, phi)

Arguments

z

vector of size L with cluster assignment of each location

ngroup

maximum number of location groups (K)

gamma1

this is the truncated stick-breaking prior parameter for the number of location groups. This value should be between 0 and 1, and small values enforce more parsimonius results (i.e., fewer groups)

burnin

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

gibbs.step

current iteration of the gibbs sampler

theta

vector of length K with the probability of each location group

phi

K x S matrix with the probability of observing each species in each group

Value

this function returns a list of 4 items (theta, z, v, and phi)


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