Hey,
I would like to make a histogram, also showing the variable mean on the x-axis and eventually combine them into one graph. My code so far looks as follows:
I realize that I use an incorrect label specifier but how do I correct it?
I would like to make a histogram, also showing the variable mean on the x-axis and eventually combine them into one graph. My code so far looks as follows:
Code:
foreach var of varlist p_beef p_beef_star {
sum `var'
local mean_`var' = r(mean)
}
hist p_beef, xtitle(UV in €) xline(`mean_p_beef') xlabel(0 mean_p_beef "Mean" 20 (20) 100) name(UV, replace)
hist p_beef_star, xtitle(adjusted UV in €) xlabel(0 mean_p_beef_star "Mean" 20 (20) 100) name(price, replace)
graph combine UV price

Comment