Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: RE: new version of -rct_minim- available


From   Christopher F Baum <baum@bc.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: new version of -rct_minim- available
Date   Wed, 6 Oct 2010 14:33:09 -0400

<>

I believe the two lines in rct_minim.ado that read

matsort H`k'_tmp `i'

in rct_minim.ado  could be replaced by

mata: st_matrix("H_`k'_tmp", sort(st_matrix(H`k'_tmp), `i'))

which would obviate the need to trundle through many lines of code in -matsort.ado-, removing that dependency on a separate routine. For example:

clear all
sysuse auto
mkmat price mpg weight, mat(a)   
tempname b
mat `b' = a
loc cs 3
matsort a `cs'
mata: st_matrix("`b'", sort(st_matrix("`b'"), `cs'))
mat c = a , `b' 
mat l c

Kit


Kit Baum   |   Boston College Economics and DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming   |   http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata   |   http://www.stata-press.com/books/imeus.html


*
*   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   |   Site index