Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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.

Details

This function is called by multmixEM.

Value

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

See Also

Examples

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

mixtools

Tools for Analyzing Finite Mixture Models

v1.2.0
GPL (>= 2)
Authors
Derek Young [aut, cre] (<https://orcid.org/0000-0002-3048-3803>), Tatiana Benaglia [aut], Didier Chauveau [aut], David Hunter [aut], Ryan Elmore [ctb], Thomas Hettmansperger [ctb], Hoben Thomas [ctb], Fengjuan Xuan [ctb]
Initial release
2020-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.