observed.log.likelihood0 | R Documentation |
Log-likelihood of the mixture model evaluated only at the alive components.
observed.log.likelihood0(x_data, w, mu, Lambda, Sigma, z)
x_data |
The observed data |
w |
Vector of mixture weights |
mu |
Vector of marginal means |
Lambda |
Factor loadings |
Sigma |
Diagonal of the common covariance matrix of the errors per cluster |
z |
Allocation vector |
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(1, dim = c(p,p))
Sigma <- 1/diag(SigmaINV)
# compute the complete.log.likelihood
observed.log.likelihood0(x_data = x_data, w = w,
mu = mu, Lambda = Lambda, Sigma = Sigma, z = z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.