In my knowledge, as we finished estimation of within model in R or other softwares,

we can calculate fixed effect of a specific individual i by

mean(yi)-mean(xi)*betahat,    betahat is our estimate

then use this calculated fixed effect and estimates of coefficient to calculate fitted value yhat, like

yhat = fixed effect + x*betahat

I did this.

But I saw that on the internet, some people suggested a method like

y-residual(...) to calculate fitted value in R

and I also did this, like

y-residual(plm(y~x))

but I got different answer between this two method, so much different.

Is there anybody know why this happened?

I will be very thankful if someone can tell me your answer or conjecture,

Thank you so much!!

Similar questions and discussions