Hi
I am running a regression (using panel data) looking at the effect of income on food consumption and controlling for age. I am trying to determine if I need a squared term for age so wish to create a scatter plot of residuals against my independent variable as I have read this will show if there is a non- linear relationship- is this correct?
Therefore do I run:
xtreg fruvege age_dv, fe robust
predict fit, xbu
gen fit_2=fit^2
xtreg fruvege age_dv fit_2, fe robust
test fit_2=0
twoway (scatter fit_2 lnm)
in which case I get this:
[ATTACH=CONFIG]temp_13277_1548951433560_83[/ATTACH]
What does this mean? what am I doing wrong?
Thank you for any help.
0 Response to Residuals in a panel data model
Post a Comment