I want to make a table that shows regression results for a bunch of dependent variables against the same independent variable by quartile groups something like this:
This is my example code:
This makes the values show up in individual row:
How can I get the same dependent variable values to be displayed in the same row?
And is there a way to display the mean of price variable at the bottom by quartile?
Q1 | Q2 | Q3 | Q4 | |
Dep var 1 | ||||
Dep var 2 | ||||
Dep var 3 | ||||
Mean of sample |
HTML Code:
sysuse auto, clear xtile price_quart = price, n(4) collect clear foreach var of varlist rep78 headroom trunk weight{ bys price_quart: collect: reg `var' mpg } collect layout (colname#cmdset#result[_r_b _r_se]) (price_quart)
How can I get the same dependent variable values to be displayed in the same row?
And is there a way to display the mean of price variable at the bottom by quartile?