Hi Peter,
On Wednesday, March 6, 2013 8:45:56 PM UTC-5, Peter Li wrote:
Does anyone know if there is an easy way to test RNG for multi normal distribution or dirichlet? (i.e. what to compare the alleged RNG distributions to)
In b01cac1782c3edba7354d900758d53ca89d23cd4, you would want to use Eigen's Cholesky decomposition and use a VectorXd rather than a Matrix<double,Dynamic,Dynamic> when the number of columns is one. So, something like
Eigen::VectorXd z(Sigma.cols());
for(int i = 0; i < sigma.cols(); i++)
z(i) = std_normal_rng();
return mu + Sigma.llt().matrixL() * z;
Same with multi_student_t.
Ben