Learn R Programming

MMDai (version 0.1.0)

FinMix: Finite k components and multiple m trials

Description

This function is applied when number of components k is known and number of trials m > 2k -1. Missing data is allowed in dataset. This function estimates parameters of latent joint distribution which observations are generated from.

Usage

FinMix(data, k, T = 2000)

Arguments

data
- an array with dimension c(n,p,d). data[i,j,c] denotes the number of trials occurs in i-th observation, j-th variable and c-th categories.
k
- number of components is known
T
- number of iterations in Gibbs sampler, default value is 2000. T should be an even number for 'burn-in'. The estimates are computed by the second-half iterations.

Value

theta - a vector that sum to 1, denotes probability of latent class.psi - an array with dimension c(k,p,d), specific probability for each variables in each component.

References

[1] Elmore, Ryan, and Shaoli Wang. "ldentifiability and Estimation in Finite Mixture Models with Multinomial Components."

Examples

Run this code
k <- 2
## IncompleteData example
data("IncompleteData")
FinMix(data = IncompleteData$data,k)

Run the code above in your browser using DataLab