0

I am currently working on a study in which I am using beta regression (in Stata). My depend variable is bounded between 0 and 1. To interpret the effects of my independent variables I am using the margins command.

However, the problem is that interaction-terms cannot be interpreted using the margins command. My model includes a quadratic term, i.e.: y=a+bX+cX^2. I want to visualize the non-linear connection between the variables by using graphs.

My question might be a bit simple, but I am not sure which values I should choose to visualize the effect. Should I use the original depend variable or the predict values?

Thanks in advance for the help.

michael
  • 11

2 Answers2

2

You could have a scatter plot with the data (dependent variable on the Y axis, one independent variable on the X axis) then add lines for different levels of the other independent variable. The lines would be of the predicted dependent variable.

Peter Flom
  • 119,535
  • 36
  • 175
  • 383
0

In R you would need to use orthogonal polynomials rather than just regressing against X and X^2 if you wanted to get any valid inference of the impact of adding the X^2 term. I'm not a Stata user, but I read that this command would be effective:

.orthpoly lvl, generate(cntr1 cntr2) degree(2)

You would also want to plot the data (x vs Y as points) and then overlay a regression line for X versus predicted-Y.

DWin
  • 7,726