Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Random walk simplex


From   "Akshay Shanker" <Akshay.Shanker@standards.org.au>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Random walk simplex
Date   Fri, 23 Oct 2009 13:55:13 +1100

Hi all, 
 
I was hoping someone would be able to  help me out. 
 
I am trying to create a random walking simplex in STATA. The procedure
to create a random K dimension simplex seems straightforward:
 
- generate K uniform RVs Xi...Xk in (0,1)
- each point in the random simplex is then i/(sum(-logXi)). 
 
But how would I go about getting this simplex to do a random walk in
Stata? More specifically, how can I choose a markov like draw of
-logXi,t based on an already given -logXi,t-1. There seems to be a
metropolis-hastings algo which selects this draw from a gamma
distribution with a mean of Xi,t-1 - but not sure how to do this in
STATA. Ideally I'd like to be able to generate a KxN matrix where the
coloumns are the simplex, which walk over the rows. 
 
Regards,
Akshay 

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index