I am applying fixed effects (o random) to a panel data. Please, after that, does a "predict" function exist?
A "predict" function that works in the same way it does with the linear regression "lm".
For a linear regression:
predict(lm.output, data.frame(x), interval="prediction", level=0.95)
For e fixed effects o random? Does a predict function exist?
I have already tried to use the function "prediction" (maybe I am not applying the right inputs (find.data?, parent.frame?, at?)) and I tried the function "prophecy.plm.out" (where I have problems installing libraries such as plmNeviim and spd4testing).
I think this issue is really important; a regression without future prediction is not enough.
Hi Tech I thank you very much
With your example I trained myself a little bit with the linear regression. A step forward.
I stll have some problem when I want to predict a plm fixed effect.
fixed = plm(y ~ x, data = Panel, index = c("entity","time"), model = "within")
Than, when I launch
predict(fixed, Panel)
It says:
"Error in crossprod(beta, t(X)) : the arguments are not compatible".
It seems there's a problem because a "plm within regression" lacks of the overall intercept.
Do you have some idea to work around this problem and predict future values in a fixed effect regression?