Dear Stata gurus
I am trying to label the output of coefplot from multiple models rather unsuccessfully. Consider the code below:
sysuse auto, clear
xtile tg = turn, n(5)
local covars "mpg trunk length"
est clear
foreach i in 1 2 3 4 5{
di "`i'"
eststo: qui regress price `covars' if tg == `i'
}
coefplot est1 est2 est3 est4 est5, drop(_cons) yline(0) vertical keep(mpg)
This produces a graph with the x-axis labelled Mileage and the model names in the legend. I am hoping to instead suppress the legend and label the models with their names on the xais as 1 2 3 4 5 and the xtitle itself to be "Quartiles of Turn". While adding xttitle("Quartiles of Turn") works, it still doesn't suppress the label for mpg and I am still unable to get the model names (1 2 3 4 5) on the xaxis.
Would be grateful for your suggestions.
I am trying to label the output of coefplot from multiple models rather unsuccessfully. Consider the code below:
sysuse auto, clear
xtile tg = turn, n(5)
local covars "mpg trunk length"
est clear
foreach i in 1 2 3 4 5{
di "`i'"
eststo: qui regress price `covars' if tg == `i'
}
coefplot est1 est2 est3 est4 est5, drop(_cons) yline(0) vertical keep(mpg)
This produces a graph with the x-axis labelled Mileage and the model names in the legend. I am hoping to instead suppress the legend and label the models with their names on the xais as 1 2 3 4 5 and the xtitle itself to be "Quartiles of Turn". While adding xttitle("Quartiles of Turn") works, it still doesn't suppress the label for mpg and I am still unable to get the model names (1 2 3 4 5) on the xaxis.
Would be grateful for your suggestions.
Comment