Hello,

I was wondering if there was an easy way to pick the columns to output with esttab when building a correlation matrix.

The standard procedure for outputting correlations matrices using esttab is, for example:
Code:
sysuse auto, clear

estpost correlate price mpg rep78, matrix
eststo corr

esttab corr, unstack label not nonum

--------------------------------------------------------------------
                                                                    
                            Price    Mileage (m~)    Repair ~1978   
--------------------------------------------------------------------
Price                           1                                   
Mileage (mpg)              -0.469***            1                   
Repair Record 1978        0.00655           0.402***            1   
--------------------------------------------------------------------
Observations                   74                                   
--------------------------------------------------------------------
* p<0.05, ** p<0.01, *** p<0.001
How could I achieve something of the sort:
Code:
esttab corr, <SELECT_COLUMNS(price)> unstack label not nonum

-------------------------------------
                                                                    
                            Price   
-------------------------------------
Price                           1                                   
Mileage (mpg)              -0.469***          
Repair Record 1978        0.00655           
-------------------------------------
Observations                   74                                   
-------------------------------------
* p<0.05, ** p<0.01, *** p<0.001
Use case: the full matrix is too big to fit nicely on a page and I could use dividing it in two. Done this manually until now.

Regards,
Vincent