linear or quadratic relationship:

#1
How can you test whether Y and X in a multiple regression have a linear or quadratic relationship using STATA?

Any help would be greatly appreciated.:wave::wave::wave:
 
#2
well its quite later however may be helpful for other. suppose you have two variables say Y and X. Y is the dependent variables and X is the explanatory variable. The relationship between Y and X either be negative or positive.. if Y increase X decrease ( Negative) or when Y increase X also increase (Positive way). In another way when you took the square of X (X^2 or X*X) and check the relationship with Y. Then the relationship between Y and Square of X know is quadratic( non linear or U shape) relation. Stata code for creating square of X is gen Xsquare= X^2
For Further understaing.. https://www.tandfonline.com/doi/abs/10.1080/09720510.2010.10701521
 

hlsmith

Omega Contributor
#3
Look at scatter plots and plots of residuals. I would imagine in STATA you should also be able to fit a Generalized Additive Model or LOESS to see what the relationship looks like.