Testing RNG for Multivariate Distributions

10 views
Skip to first unread message

Peter Li

unread,
Mar 6, 2013, 8:45:56 PM3/6/13
to stan...@googlegroups.com, Peter Li
Hi,

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)


Thanks,
Peter

Ben Goodrich

unread,
Mar 6, 2013, 10:13:37 PM3/6/13
to stan...@googlegroups.com, Peter Li
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)
 
One problem is that there are dozens of MVN tests, see

http://scholar.google.com/scholar?cluster=17172775488998657703&hl=en&as_sdt=5,33&sciodt=0,33

and in principle you can do Pearson-like tests, but I don't know of any test that is both simple to compute, deterministic, and applies to any multivariate distribution.

Ben

Jiqiang Guo

unread,
Mar 6, 2013, 11:16:06 PM3/6/13
to stan...@googlegroups.com, Peter Li
But at least we can test the marginal of MVN and linear combination of MVN, both of which are normal.  For dirichlet, we can also test the marginal, which is the beta.

--
Jiqiang 

--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ben Goodrich

unread,
Mar 8, 2013, 2:16:49 PM3/8/13
to stan...@googlegroups.com, Peter Li
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

Peter Li

unread,
Mar 9, 2013, 3:06:24 PM3/9/13
to Ben Goodrich, Peter Li, stan...@googlegroups.com
Ah. I didn't realize there was already a method implemented for Cholesky decomp, so I used the formula on wiki, but I fixed it now and used VectorXd in multi norm and multi student-t.

Thanks,
Peter
Reply all
Reply to author
Forward
0 new messages