How do I have Stata combine two regression lines on the same plot?
If you want to plot a regression line (y on x) for one set of points (gender == “F”) and another for a different set of points (gender == “M”), you can use the following command: graph twoway (scatter y x if gender==”F”) (lfit y x if gender==”F”) (scatter y x if gender==”M”) (lfit y x if gender==”M”) This command is easily generalized for multiple groups and so forth. Top of page.