fast_dmvnorm_chol_inverse | R Documentation |
Compute multivariate Normal density (log-value) evaluated at each row of a given matrix. The function does not check the arguments, use at your own risk.
fast_dmvnorm_chol_inverse(x, mean, chol_inverse)
x |
A matrix of size n times d |
mean |
A vector of size d specifying the mean vector of the multivariate Normal |
chol_inverse |
A matrix of size d x d specifying the inverse of the upper-triangular Cholesky
factor of the covariance matrix of the multivariate Normal,
for instance obtained using |
A vector of n evaluations of the multivariate Normal log-pdf, one for each row of x
Sigma <- diag(1, 5, 5) Sigma[1,2] <- Sigma[2,1] <- 0.3 Sigma_chol <- chol(Sigma) x <- fast_rmvnorm_chol(2, rep(0, 5), Sigma_chol) fast_dmvnorm_chol_inverse(x, rep(0, 5), solve(Sigma_chol))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.