R/dmixdiri.R

Defines functions dmixdiri

Documented in dmixdiri

dmixdiri <- function(x, a, prob, logged = TRUE) {
  g <- dim(a)[1]
  f <- 0
  for (i in 1:g)  f <- f + prob[i] * Compositional::ddiri(x, a[i, ], logged = FALSE)

  if ( logged )  f <- log(f)
  f
}

Try the Compositional package in your browser

Any scripts or data that you put into this service are public.

Compositional documentation built on Oct. 9, 2024, 5:10 p.m.