Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I have Stata combine two regression lines on the same plot?

plot REGRESSION stata
0
0 Posted

How do I have Stata combine two regression lines on the same plot?

0
0

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.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123