sample.Theta: Sample a parameter vector

Description Usage Arguments Examples

View source: R/sample.Theta.R

Description

This function samples a parameter vector for a latent class model. Each row from each conditional distribution matrix is sampled from the uniform Dirichlet distribution.

Usage

1

Arguments

r

A vector (r[1],...,r[m]) of integers, where m is the number of observed variables and r[i] is teh statespace of the i-th variable.

k

The number of latent classes fitted

Examples

1
2
3
r <- c(2,2,2,2)
k <- 3
sample.Theta(r,k)

pzwiernik/LatentClass documentation built on May 26, 2019, 11:35 a.m.