hi, i want to use a box plot with a dummy variable like in the image. So in other words, i want to graph a box plot using the percentage of people with 0 or 1.
Thank you
Thank you
sysuse auto, clear stripplot mpg, over(foreign) yla(, ang(h)) cumul box(barw(0.05)) boffset(-0.1) pctile(5) vertical name(G1, replace) bysort foreign : egen count = count(mpg) gen where = 40 gen toshow = "{it:n} = " + strofreal(count) stripplot mpg, over(foreign) yla(, ang(h)) cumul box(barw(0.05)) boffset(-0.1) pctile(5) vertical addplot(scatter where foreign, ms(none) mla(toshow) mlabsize(medlarge)) name(G2, replace)
Comment