Hi,
I have noticed that when I run the following, they produce exactly similar results for coefficients, SE and residuals. However, their predicted yhats are not similar and this is due to different constents.
My question is
If I need to use predicted yhat, not the residuals, which model will I use? And how will I know that whatever I am choosing is the correct one for yhat?
sysuse auto, clear
xtset rep
regress price mpg weight length i.rep i.trunk
predict ccc1
areg price mpg weight length i.trunk, absorb(rep)
predict ccc
reghdfe price mpg weight length, absorb (rep trunk)
predict ccc2
regress price mpg weight length i.rep i.trunk
predict bbb1, residuals
areg price mpg weight length i.trunk, absorb(rep)
predict bbb, residuals
reghdfe price mpg weight length, absorb (rep trunk) resid
Related Posts with Coefficient, SE and Residuals are same but not the predicted yhat
Using an interaction between a categorical and a continuous interaction where the base category is highly informativeDear Statalist, Sorry if my question is too general for this forum. I hope it is okay. I am lookin…
Creating a new variable differentiated by genderHi Statalist. I want to be able to test if there is a difference in the effect of level of educatio…
ivprobit and cmp ivprobitHi. I am using an individual-based survey and I am trying to estimate the impact of migration and re…
Merging datasets code issueHi all! I can't figure out a certain line of code. I'd like to merge two data sets. The master data…
Replacing "NA" with missingI'm super new to using Stata and could really use some help! I have imported a csv file from R into …
Subscribe to:
Post Comments (Atom)
0 Response to Coefficient, SE and Residuals are same but not the predicted yhat
Post a Comment