Dear Statalist,
I am using coefplot to plot regression coefficients from four different models. On the Y axis, I want to reference a value below Y-axis value (for example the mean of a given variable).
Here is a reproducible example:
How can I show only for the top (and bottom) panel "price" and "weight" corresponding to the point estimates? I want to avoid having price and weight when not necessary.
I am using coefplot to plot regression coefficients from four different models. On the Y axis, I want to reference a value below Y-axis value (for example the mean of a given variable).
Here is a reproducible example:
HTML Code:
#delimit; sysuse auto, clear; reg price mpg; est store Y1; summ price; loc estm1 = string(round(r(mean),.01)); reg weight mpg; est store Y2; summ weight; loc estm2 = string(round(r(mean),.01)); coefplot (Y1, rename(mpg = "price {sub:[`estm1']}") mcolor(navy) ciopts(color(navy))) (Y2, rename(mpg = "weight {sub:[`estm1']}") mcolor(navy) ciopts(color(navy))) || (Y1, rename(mpg = "price {sub:[`estm1']}") mcolor(navy) ciopts(color(navy))) (Y2, rename(mpg = "weight {sub:[`estm1']}") mcolor(navy) ciopts(color(navy))) || (Y1, rename(mpg = "price {sub:[`estm2']}") mcolor(navy) ciopts(color(navy))) (Y2, rename(mpg = "weight {sub:[`estm2']}") mcolor(navy) ciopts(color(navy))) || (Y1, rename(mpg = "price {sub:[`estm2']}") mcolor(navy) ciopts(color(navy))) (Y2, rename(mpg = "weight {sub:[`estm2']}") mcolor(navy) ciopts(color(navy))) , keep(mpg) coeflabel( price = "Price" weight = "Weight" ) offset(0) legend(off);
How can I show only for the top (and bottom) panel "price" and "weight" corresponding to the point estimates? I want to avoid having price and weight when not necessary.
Comment