Description Usage Arguments Details Value Examples
View source: R/rnorm_qinv_l_eigen.R
Sample from multivariate normal distribution with mean Q^{-1}l and covariance matrix Q^{-1} where Q = UDU^t
1 2 3 4 5 | rnorm_qinv_l_eigen <- function(
n,
U,
d,
l)
|
n |
number of elements to generate |
U |
orthogonal matrix such that Q = UDU^t |
d |
p by 1 vector, D = diag(d) and Q = UDU^t |
l |
p by 1 vector |
This function is useful to sample from N((Q + sI)^{-1}l, (Q + sI)^{-1}) given the eigen decomposition of Q
x |
An p x 1 vector if n=1 otherwise a n by p matrix |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.