Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[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 Baum   |   Boston College Economics and DIW Berlin   |
An Introduction to Stata Programming   |
An Introduction to Modern Econometrics Using Stata   |

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index