Hi,
I would like to summarize my data in a way so that the means of my variables of interest are calculated by industry.
The following code brings me close to what I want
However, instead of having the number of observations per industry in rows I would like to have a column next to variable A so that the table takes on the following form: 
Any help is greatly appreciated
I would like to summarize my data in a way so that the means of my variables of interest are calculated by industry.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float A byte(B Industry) double C float D .13366325 0 6 24759 .14703006 .12301464 2 10 273023 4.5886574 .09777707 0 6 231424 8.948502 .1706112 3 6 1853901 2.511649 .10899235 0 11 262964 4.2845984 .10899235 0 11 262964 4.2845984 .10216609 0 11 0 0 .07947874 0 11 0 0 .10216609 0 11 0 0 .10216609 0 11 0 0 .14309178 1 11 61908 2.0505333 .09777707 0 6 231424 8.948502 .1706112 3 6 1853901 2.511649 .10216609 0 11 0 0 .1706112 3 6 1853901 2.511649 .10216609 0 11 0 0 .09777707 0 6 231424 8.948502 .1706112 4 6 1853901 2.511649 .10899235 0 11 262964 4.2845984 .1706112 3 6 1853901 2.511649 end label values Industry Acq_SIC_FF12 label def Acq_SIC_FF12 6 "Business Equipment -- Computers, Software, and Electronic Equipment", modify label def Acq_SIC_FF12 10 "Healthcare, Medical Equipment, and Drugs", modify label def Acq_SIC_FF12 11 "Finance", modify order Industry
Code:
tabstat A B C D, by(Industry) stat(mean n) nototal
Any help is greatly appreciated
Comment