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.

Is there a way in Stata to represent each groups regression line on a single graph?

Graph groups line REGRESSION stata
0
10 Posted

Is there a way in Stata to represent each groups regression line on a single graph?

0
10

Yes, you can graph & label the regression lines for each group. Here are the steps: 1) Run your regression 2) Predict a yhat value for the model by using the command: Syntax: predict varname Example: predict yhata 3) Separate the yhat values by your grouping variable Syntax: separate varname, by (grouping_IV) Example: separate yhata, by (ses) The Stata output that follows this command will show you that you have careated his new variables (one for each level of the grouping IV), named yhata1, yhata2, yhata3, etc….

Related Questions

What is your question?

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

Experts123