Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: re: new version of rct_minim available: correction
From
Christopher F Baum <[email protected]>
To
<[email protected]>
Subject
st: re: new version of rct_minim available: correction
Date
Wed, 6 Oct 2010 14:44:10 -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/