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 on April 23, and its replacement, 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 <>
To   <>
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 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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index