Hello! I am want to show the results of both the mean values (with sd) and difference (with se) to be outputted in the same latex table. In the below code they are separate and the colums and rows are also switched. Anyhelp on how they can be shown alongside would be very useful. Please note I cannot use ttest since I have to weight the regressions.
Code:
sysuse auto.dta, clear *code to create multiple dummies as an example set seed 12345 generate rannum = uniform() sort rannum gen grp1 = 1 in 1/25 replace grp1 = 0 if grp1 != 1 gen grp2 = 1 in 26/50 replace grp2 = 0 if grp2 != 1 gen grp3 = 1 in 51/74 replace grp2 = 0 if grp2 != 1 eststo est1: estpost sum price mpg rep78 [aweight= weight] if grp1 == 1 eststo est2: estpost sum price mpg rep78 [aweight= weight] if grp2 == 1 eststo est3: estpost sum price mpg rep78 [aweight= weight] if grp3 == 1 eststo est4: reg price grp1 grp2 [aweight= weight], robust eststo est5: reg mpg grp1 grp2 [aweight= weight], robust eststo est6: reg rep78 grp1 grp2 [aweight= weight], robust esttab, main(mean) aux(sd) label nodepvar nostar nonote esttab, main(b) aux(se) label nodepvar nostar nonote
Comment