Tuesday, October 27, 2020

Confidence Intervals / Errr plots with binscatter

I am trying to include confidence intervals / errors bars in a plot for two variables using -binscatter-. Is there any straightforward way to achieve this? I could only think of a solution involving -preserve- and -statsby-

Code:
sysuse auto, clear
gen price2 = price * 2
binscatter price price2 mpg , line(connect)

No comments:

Post a Comment