Code:
sysuse auto.dta, clear eststo: ivreghdfe mpg (weight=trunk) foreign [aw=length] estadd ysumm estadd local YAVG=e(ymean) esttab using "output.tex", scalars("YAVG YAVG") replace
When calculating YAVG, this code will, rightly, NOT include those observations that were not included in regression (such as those observations that have missing values in at least one of control variables).
Also, when calculating it, this code will, again rightly, weight the observations by length.
Now I want to do it for interquartile range of Y, not just mean of Y. How can I do that?
Ultimately, interquartile range should be multiplied with the coefficient to produce the row in the output table meaning "predicted change in Y as a response to X"
Also, YAVG saves too many decimals. How can I shorten it?
0 Response to Creating output table with interquartile range of Y after regression
Post a Comment