| d_mvmf_polysph | R Documentation |
Computes the density of an m-mixture of product of von
Mises–Fisher densities on the polysphere.
d_mvmf_polysph(x, d, mu, kappa, prop, log = FALSE)
x |
a matrix of size |
d |
vector of size |
mu |
a matrix of size |
kappa |
a matrix of size |
prop |
a vector of size |
log |
compute the logarithm of the density? Defaults to |
A vector of size nx with the evaluated density.
# Simple check of integration on S^1 x S^2
d <- c(1, 2)
mu <- rbind(c(0, 1, 0, 1, 0), c(1, 0, 1, 0, 0))
kappa <- rbind(c(5, 2), c(1, 2))
prop <- c(0.7, 0.3)
x <- r_mvmf_polysph(n = 1e4, d = d, mu = mu, kappa = kappa, prop = prop)
mean(1 / d_mvmf_polysph(x = x, d = d, mu = mu, kappa = kappa, prop = prop)) /
prod(rotasym::w_p(p = d + 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.