sample.theta: Sample theta and vk parameters

Description Usage Arguments Value

View source: R/SBM_gibbs_functions.R

Description

Sample vk parameters from their full conditional distributions and convert these vk parameters into theta parameters

Usage

1
sample.theta(ngroup.loc, gamma.v, burnin, gibbs.step, theta, psi, z)

Arguments

ngroup.loc

maximum number of groups for locations (KL)

gamma.v

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

burnin

number of MCMC samples that are going to be thrown out as part of the burn-in phrase

gibbs.step

current iteration of the gibbs sampler

theta

vector of size KL containing the current estimate of theta (i.e., probability of each location group)

psi

KL x KS matrix containing the current estimate of psi

z

this is a vector of length L, storing the current membership of each location

Value

this function returns a list containing 4 items (theta, vk, psi, and z)


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