Computes the multinomial log(likelihood).
log_likelihood(n, pi, exclude_diagonal = FALSE)log(likelihood)
Matrix of observed counts
Matrix of same dimensions as n. Model-based matrix of predicted proportions
logical. Should diagonal cells of square matrix be excluded from the computation? Default is FALSE. The effect of setting it to TRUE for non-square matrices may be unintuitive and should he avoided.