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.
Related Posts with Residuals in a panel data model
How to adjust weights when combining multiple survey data?Dear all, I am currently trying to estimate a model using WLS using a survey data for multiple peri…
Faults and Hiccups in the programThe week code is incorrect, and the week starts on Wednesday instead of Monday, which has persisted …
Goodness-of-fit and mediation analysis in GSEMHi, all I am hoping for some insights into an appropriate independent goodness-of-fit test for GSEM…
Adding new rows to the dataset to create conversation turnsHello! I am working on a text mining project that requires input text to be in a specific format. T…
Regression output - Bug?Hi everyone, I am trying to run some old code (version 14.2) using a new Stata version (15.1) on a …
Subscribe to:
Post Comments (Atom)
0 Response to Residuals in a panel data model
Post a Comment