R/dmixvmf.R

Defines functions dmixvmf

Documented in dmixvmf

dmixvmf <- function(y, probs, mu, k, logden = FALSE) {
  g <- length(k)
  den <- matrix(nrow = dim(y)[1], ncol = g)
  for (j in 1:g)  den[, j] <- Directional::dvmf(y, mu[j, ], k[j])
  den <- den %*% probs
  if ( logden )  den <- log(den)
  den
}

Try the Directional package in your browser

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

Directional documentation built on Oct. 12, 2023, 1:07 a.m.