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
Different kinds of missingsDear stata-community, I collected data on about 2000 participants via an online survey. I am now in…
unable to export mean and sd using tabstatHello, I am using the below code to export my descriptive statistics. All is good except that I get…
Twoway line graph with non-integer intervalsHi, I want to create a two-way line graph with the line restricted between two years value. The prob…
Problem with xtunitroot llc: throws error r(2000) with strongy balanced panelI am using the Levin Lin Chiu test in Stata 17 to test for stationarity in a panel of 115 countries,…
Error in post command: unknown function () post: above message corresponds to expression 1, variable I´m getting an error in my code when using post command but I don´t know why. The code is reproduc…
Subscribe to:
Post Comments (Atom)
0 Response to Coefficient, SE and Residuals are same but not the predicted yhat
Post a Comment