I have three different variables in Stata, var1
, var2
, and var3
.
I need to make a summary table of these three variables so that I have the observation number, mean, sd, min, max as the fields in the resulting summary table.
I am using the following code :
su var1 if restriction == 2
su var2 if restriction == 3
su var3 if restriction == 4
Since the summary table is created from variables that are applied with restrictions, I am unable to use :
su var1 var2 var3
I would be very grateful if anyone has any ideas on how to modify my code so that instead of three lines of code I can use one line of code to get a single table will all the stats I require, which I can then copy as a table into my Word document.
if
qualifier is not theif
command. Edited accordingly. – Nick Cox