complete.log.likelihood: Complete log-likelihood function for xCx models.

Description Usage Arguments Value Author(s) Examples

View source: R/fabMix.R

Description

Complete log-likelihood function for models with same error variance per component (xCx).

Usage

1
complete.log.likelihood(x_data, w, mu, Lambda, SigmaINV, z)

Arguments

x_data

n\times p matrix containing the data

w

a vector of length K containing the mixture weights

mu

K\times p matrix containing the marginal means per component

Lambda

K\times p\times q array of factor loadings per component

SigmaINV

p\times p precision matrix (inverse covariance)

z

A vector of length n containing the allocations of the n datapoints to the K mixture components

Value

complete log-likelihood value

Author(s)

Panagiotis Papastamoulis

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
	library('fabMix')
	data(waveDataset1500)
	x_data <- waveDataset1500[ 1:20, -1] # data
	z <-  waveDataset1500[ 1:20, 1]	# class
	p <- dim(x_data)[2]
	q <- 2
	K <- length(table(z))		# 3 classes
	# give some arbitrary values to the parameters:
	set.seed(1)
	w <- rep(1/K, K)
	mu <- array( runif(K * p), dim = c(K,p) )
	Lambda <- array( runif(K*p*q), dim = c(K,p,q) )
	SigmaINV <- array(1, dim = c(p,p))
	# compute the complete.log.likelihood
	complete.log.likelihood(x_data = x_data, w = w, mu = mu, 
		Lambda = Lambda, SigmaINV = SigmaINV, z = z)

fabMix documentation built on Feb. 20, 2020, 1:09 a.m.