complete.log.likelihood_Sj | R Documentation |
Complete log-likelihood function for models with different error variance per component (xUx).
complete.log.likelihood_Sj(x_data, w, mu, Lambda, SigmaINV, z)
x_data |
|
w |
a vector of length |
mu |
|
Lambda |
|
SigmaINV |
|
z |
The allocation vector. |
complete log-likelihood value
Panagiotis Papastamoulis
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( c(0.5, 0.75, 1), dim = c(K,p,p))
# compute the complete.log.likelihood
complete.log.likelihood_Sj(x_data = x_data, w = w, mu = mu,
Lambda = Lambda, SigmaINV = SigmaINV, z = z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.