# logLikelihoodcelda_CG: Calculate Celda_CG log likelihood In celda: CEllular Latent Dirichlet Allocation

## Description

Calculates the log likelihood for user-provided cell population and feature module clusters using the 'celda_CG()' model.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12``` ```logLikelihoodcelda_CG( counts, sampleLabel, z, y, K, L, alpha, beta, delta, gamma ) ```

## Arguments

 `counts` Integer matrix. Rows represent features and columns represent cells. `sampleLabel` Vector or factor. Denotes the sample label for each cell (column) in the count matrix. `z` Numeric vector. Denotes cell population labels. `y` Numeric vector. Denotes feature module labels. `K` Integer. Number of cell populations. `L` Integer. Number of feature modules. `alpha` Numeric. Concentration parameter for Theta. Adds a pseudocount to each cell population in each sample. Default 1. `beta` Numeric. Concentration parameter for Phi. Adds a pseudocount to each feature module in each cell population. Default 1. `delta` Numeric. Concentration parameter for Psi. Adds a pseudocount to each feature in each module. Default 1. `gamma` Numeric. Concentration parameter for Eta. Adds a pseudocount to the number of features in each module. Default 1.

## Value

The log likelihood for the given cluster assignments

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25``` ```data(celdaCGSim) loglik <- logLikelihoodcelda_CG(celdaCGSim\$counts, sampleLabel = celdaCGSim\$sampleLabel, z = celdaCGSim\$z, y = celdaCGSim\$y, K = celdaCGSim\$K, L = celdaCGSim\$L, alpha = celdaCGSim\$alpha, beta = celdaCGSim\$beta, gamma = celdaCGSim\$gamma, delta = celdaCGSim\$delta ) loglik <- logLikelihood(celdaCGSim\$counts, model = "celda_CG", sampleLabel = celdaCGSim\$sampleLabel, z = celdaCGSim\$z, y = celdaCGSim\$y, K = celdaCGSim\$K, L = celdaCGSim\$L, alpha = celdaCGSim\$alpha, beta = celdaCGSim\$beta, gamma = celdaCGSim\$gamma, delta = celdaCGSim\$delta ) ```