I am trying to create a table (4 columns and 3 rows) with names of states (variable state_name which is a numeric variable) with the maximum and minimum of another variable in the format below.
min State_name max State_name
Var1
Var 2
Var3
I'm using this code:
Code:
summ imm_recdint scalar max=r(max) scalar min=r(min) eststo D1 : tabstat imm_recdint state_name if (imm_recdint==min) eststo D2 :tabstat imm_recdint state_name if (imm_recdint==max)
eststo D1 : tabstat | imm_recdint | state_name if (imm_recdint==min) |
stats imm_re~t | state_~e | |
mean 2.607753 | 5 | |
. eststo D2 :tabstat | imm_recdint | state_name if (imm_recdint==max) |
stats imm_re~t | state_~e | |
mean 3.683776 | 18 | |
0 Response to Esttab not giving the right output
Post a Comment