ParEst function

Estimate theta and psi in multinomial mixture model

Estimate theta and psi in multinomial mixture model

This function is used to estimate theta and psi in multinomial mixture model given the number of components k.

ParEst(data, d, k, TT = 1000)

Arguments

  • data: - data in matrix formation with n rows and p columns
  • d: - number of categories for each variable
  • k: - number of components
  • TT: - number of iterations in Gibbs sampler, default value is 1000. T should be an even number for 'burn-in'.

Returns

theta - vector of probability for each component

psi - specific probability for each variable in each component

Examples

# dimension parameters n<-200; p<-5; d<-rep(2,p); # generate complete data Complete<-GenerateData(n, p, d, k = 3) # mask percentage of data at MCAR Incomplete<-Complete Incomplete[sample(1:n*p,0.2*n*p,replace = FALSE)]<-NA # k identify K<-kIdentifier(data = Incomplete, d, TT = 10) Par<-ParEst(data = Incomplete, d, k = K$k_est, TT = 10)
  • Maintainer: Chaojie Wang
  • License: GPL (>= 2)
  • Last published: 2020-05-02

Useful links