Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

mixtools (version 1.0.1)

ldmult: Log-Density for Multinomial Distribution

Description

Return the logarithm of the multinomial density function.

Usage

ldmult(y, theta)

Arguments

y
A vector of multinomial counts.
theta
A vector of multinomial probabilities. May have same number of components as or one fewer component than y. In the latter case, an extra component is appended so that theta sums to one.

Value

  • ldmult returns the logarithm of the multinomial density with parameter theta, evaluated at y.

Details

This function is called by multmixEM.

See Also

multmixEM

Examples

Run this code
y <- c(2, 2, 10)
theta <- c(0.2, 0.3, 0.5)
ldmult(y, theta)

Run the code above in your browser using DataLab