I've residus value in my model result. I would like to transform and add them in my data frame.That's means, to have results with low residus. I'm using FE model. So, i've tried to add but my method doesn't work. Here my R details:
fixed = plm(sp ~lag(debt)+lag(I(debt^2))+outgp++bcour+gvex+vlexp+vlimp, data=bdata, index=c("country", "year"), model="within")
method for adding my residus values:
bdata$resid = fixed$resid