In my dataset I have 5 dummies, indicating whether a firm belongs to a specific group.
I want to create a summary statistics where the rows are my variables, first line of column are the group and second line of columns there is mean and sd. Just to give you the clearest overview, the results should be likt this picture following
Array
So on stata this is what I've done
Code:
gen group_48=. replace group_48=1 if quint48_1==1 replace group_48=2 if quint48_2==1 replace group_48=3 if quint48_3==1 replace group_48=4 if quint48_4==1 replace group_48=5 if quint48_5==1
Code:
bys group_48: asdoc sum sdresidual dac abn_cfo abn_prod abn_disexp aver_shareturn average_inst_hhi average_perc_inst average_numb_inst analysts_log logat cashvol salevol workcapit proploss delsalegrowth futearn ppe_control deltaWRC changesale cfo_control futearn earn bigaud accr roa if e(sample), stat(N mean sd)
Array
Here the problem are twice:
1. The coumns should be the row
2. Stata seems to recognize only two groups.
Thanks for your time and for any suggestion you may have
0 Response to Problem with summarystatistics by group
Post a Comment