Skip to contents

Categorical log-probability mass function

Usage

categorical_lpmf(x, prob, sum = TRUE)

Arguments

x

Vector of categorical outcomes.

prob

Vector or matrix of probabilities.

Value

The sum of the log-probability.