For example:
Code:
sysuse auto gen pw = 1 svyset [pw=pw] svy: reg mpg c.weight esttab, cells(b & se(par))
-------------------------
(1)
mpg
b/se
-------------------------
weight -.0060087 (.0005801)
_cons 39.44028 (1.974654)
-------------------------
N 74
-------------------------
This is the desired output.
Let's say I want to store the mean and sd and print that out.
Code:
sysuse auto gen pw = 1 svyset [pw=pw] svy: mean mpg estat sd mat values = (r(mean),r(sd))' mat rownames values = "Mean" "SD" esttab matrix(values), cells(Mean & SD(par))
-------------------------
values
y1
-------------------------
Mean 21.2973
SD 5.785503
-------------------------
How would you go about this? Note that I usually run many iterations (e.g I have a 2x10 matrix with first row being means and second SDs or SE).
I have done the work of putting 21.2973 (5.785503) in post but there has to be a better way.
0 Response to How to print values in parenthesis when using a matrix with esttab?
Post a Comment