I'm trying to order fixed-effects regression results from the smallest estimated coefficient to the greatest. For example:
However, this gets rid of the row and column names, so I can't tell which results are for which variable without manually comparing the coefficients. Can anyone help me with this? I'd like to be able to bring the matrix back from Mata to Stata without losing the row and column names.
Code:
sysuse auto, clear xtset foreign xtreg price mpg headroom trunk weight , fe r matrix results = r(table)' matrix list results mata : st_matrix("results", sort(st_matrix("results"), 1)) /* This gets rid of the row and column names*/ matrix list results
Comment