+ llhLambda <- c(sumLogLLH/n, (dimension + m + 1) * k - 1)
+ # densite <- vector("double", n)
+ # for (r in 1:k)
+ # {
+ # if (length(col.sel) == 1)
+ # {
+ # delta <- (Y %*% rhoLambda[, , r] - (X[, col.sel] %*% t(phiLambda[col.sel, , r])))
+ # } else delta <- (Y %*% rhoLambda[, , r] - (X[, col.sel] %*% phiLambda[col.sel, , r]))
+ # densite <- densite + piLambda[r] * det(rhoLambda[, , r])/(sqrt(2 * base::pi))^m *
+ # exp(-rowSums(delta^2)/2)
+ # }
+ # llhLambda <- c(mean(log(densite)), (dimension + m + 1) * k - 1)