I am wondering how one can use a matrix created in STATA (outside MATA) and use in MATA.
 
Specifically, I would like a .do file to do something like this:
 
...
...
 
matrix adjp = (adj1', adj2', adj3', adj4')
 
mata r = rank(adjp)
 
gen newr = r
 
...
...
 
In other words bring a matrix into MATA and then extract from MATA a sacalar that I would use in the rest of the program.
 
Thanks.
 
Richard
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/