sampleFastGaussian {countSTAR} | R Documentation |
Sample a Gaussian vector using the fast sampler of BHATTACHARYA et al.
Description
Sample from N(mu, Sigma) where Sigma = solve(crossprod(Phi) + solve(D)) and mu = Sigma*crossprod(Phi, alpha):
Usage
sampleFastGaussian(Phi, Ddiag, alpha)
Arguments
Phi |
|
Ddiag |
|
alpha |
|
Value
Draw from N(mu, Sigma), which is p x 1
, and is computed in O(n^2*p)
Note
Assumes D is diagonal, but extensions are available
[Package countSTAR version 1.0.2 Index]