sample.z.mixmod: Internal function to sample latent clusters (for...

Description Usage Arguments Value

View source: R/mixmod_gibbs_functions.R

Description

This function samples the latent z parameter within the Gibbs sampler. Calls on the rmultinom1 function written in C++. Not for calling directly by users.

Usage

1
sample.z.mixmod(nobs, nmaxclust, dat, ltheta, lphi, ndata.types)

Arguments

nobs

numeric. The total number of rows in the dataset.

nmaxclust

numeric. A single number indicating the maximum number of clusters to test.

dat

A data frame containing only columns of the discretized data streams for all observations.

ltheta

numeric. A vector of log-transformed estimates for parameter theta.

lphi

A list containing log-transformed estimates for each data stream of the phi parameter.

ndata.types

numeric. The number of data streams being analyzed.

Value

A vector with estimates for z for each observation within dat.


bayesmove documentation built on Oct. 22, 2021, 9:08 a.m.