Site icon Stata.Professor : Your Partner in Research

Reply To: asdoc: using two variables with bysort for summary statistics

Dear Dr. Atta, Indeed the code apparently seems to solve the problem but is limited in displaying the complete information. It only displays the numbers as 1,2,3 for the grouping variables in Country_ID, which is not if much use. In simple words I need the output as below:
summary stats of Var1(Profit) of Country & ID_Type  
Country	                 ID_type
 	      Banks(Profit)	      Real Estate (Profit)
___________________________________________________________	
            N, Mean, SD, min max       N, Mean, SD, min max
_______________________________       _____________________
Bahrain	        11	                  6	
Bangladesh	 8	                  1	
Egypt	        14	                  2	
Indonesia	16	                  0	
Jordan	       126	                  2	
Total	       xyz                      xyz	
_________________________________________________________
However, I get the output from the above given code in #3193 as:
 
_____________________________________________________
ID     N	mean	 sd	  min	  max
_____________________________________________________
 1	264	.233	.497	-1.999	 2.387
 10	77	.13	.332	-.751	.745
 2	279	.197	.366	-1.999	 1.918
 3	294	.109	.149	-.785	.584
 4	31	.188	.072	.025	.358
 5	275	.189	.26	-.743	.996
 6	82	-.064	.277	-1.339	.329
 7	857	.099	1.243	-6.832	 29.043
 8	0	.	.	.	.
 9	631	-.002	.394	-1.999	 1.865
__________________________________________________
What I need is the depiction of my country and ID types in the first column here which is just shown as numbers. I hope there shall be some way to get around this. Because The number of ID_type I have is more than 600, it is not very convenient to do this manually. Kind Regards: Aamina
Exit mobile version