Dear Statalist,
I am running a model with 20 explanatory variables of interest. Each variable is an exposure to a specific shock at a specific age. For example, (e14, s14, d14 and q14) are shocks experienced at age 1-4; (e58, s58, d58 and q58) are shocks at age 5-8; (e912, s912, d912 and q912) are shocks at age 9-12; (e1316, s1316, d1316 and q1316) are shocks at age 13-16; and (e1719, s1719, d1719 and q1719) are shocks at age 17-19.
I regress the 20 explanatory variables on four different outcomes (See model below please).
local out “out1 out2 out3 out4”
foreach v in `out’ {
eststo `v’: reghdfe `v’ e14 s14 d14 q14 e58 s58 d58 and q58 e912 s912 d912 q912 e1316 s1316 d1316 q1316 e1719 s1719 d1719 q1719, a(`fe’) cluster(country)
}
I would like to use coefplot to plot all the coefficients but arrange the coefficients based on age. I want a plot like the one shown below. I thought about grouping the estimates using matrix, e.g., mat A = [e14, s14, d14, q14] and applying coefplot, but it is still not clear to me how to go about it.
Any assistance given would be appreciated.
Thank you
I am running a model with 20 explanatory variables of interest. Each variable is an exposure to a specific shock at a specific age. For example, (e14, s14, d14 and q14) are shocks experienced at age 1-4; (e58, s58, d58 and q58) are shocks at age 5-8; (e912, s912, d912 and q912) are shocks at age 9-12; (e1316, s1316, d1316 and q1316) are shocks at age 13-16; and (e1719, s1719, d1719 and q1719) are shocks at age 17-19.
I regress the 20 explanatory variables on four different outcomes (See model below please).
local out “out1 out2 out3 out4”
foreach v in `out’ {
eststo `v’: reghdfe `v’ e14 s14 d14 q14 e58 s58 d58 and q58 e912 s912 d912 q912 e1316 s1316 d1316 q1316 e1719 s1719 d1719 q1719, a(`fe’) cluster(country)
}
I would like to use coefplot to plot all the coefficients but arrange the coefficients based on age. I want a plot like the one shown below. I thought about grouping the estimates using matrix, e.g., mat A = [e14, s14, d14, q14] and applying coefplot, but it is still not clear to me how to go about it.
Any assistance given would be appreciated.
Thank you
Comment