update_alpha: sample alpha - hyperparameter for latent state prevalences...

Description Usage Arguments Value

View source: R/sample_mcmc.R

Description

This function samples the parameters from a grid (this is used only for model with pre-specified latent state dimension M); NB: currently it uses uniform prior or Beta prior for the reparameterized hyperparameter; check if this is can be replaced by Gamma.

Usage

1
update_alpha(H_star, t, M, a = 1, b = 1, show_density = FALSE)

Arguments

H_star

binary matrix of latent state profiles (row for clusters, column for latent states)

t

number of clusters

M

latent state dimension

a, b

hyperparameter for Beta distribution over reparameterized alpha.

show_density

show the full conditional density of alpha given other unknown parameters; FALSE by default.

Value

an updated alpha value (positive)


zhenkewu/rewind documentation built on Sept. 9, 2020, 3:40 p.m.