logLikelihoodcelda_C: Calculate Celda_C log likelihood

Description Usage Arguments Value See Also Examples

View source: R/celda_C.R

Description

Calculates the log likelihood for user-provided cell population clusters using the 'celda_C()' model.

Usage

1
logLikelihoodcelda_C(counts, sampleLabel, z, K, alpha, beta)

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.

K

Integer. Number of cell populations.

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 in each cell population. Default 1.

Value

Numeric. The log likelihood for the given cluster assignments

See Also

'celda_C()' for clustering cells

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(celdaCSim)
loglik <- logLikelihoodcelda_C(celdaCSim$counts,
  sampleLabel = celdaCSim$sampleLabel,
  z = celdaCSim$z,
  K = celdaCSim$K,
  alpha = celdaCSim$alpha,
  beta = celdaCSim$beta
)

loglik <- logLikelihood(celdaCSim$counts,
  model = "celda_C",
  sampleLabel = celdaCSim$sampleLabel,
  z = celdaCSim$z,
  K = celdaCSim$K,
  alpha = celdaCSim$alpha,
  beta = celdaCSim$beta
)

celda documentation built on June 9, 2020, 2 a.m.