3

I have a large panel which I am estimating via plm with fixed effects.

For example

Test.fe <- plm( Y ~ x1+x2, data=test, model="within")

I used summary(Test.fe) to print the estimating results and to get the fixed effects, it is possible to use fixef.

But now my question: How can I plot the estimated Y values to compare with my real Y values?

Thanks.

StepUp
  • 36,391
  • 15
  • 88
  • 148
Andre
  • 105
  • 2
  • 7
  • Potential [duplicate](http://stackoverflow.com/questions/7123060/is-there-a-predict-function-for-plm-in-r) (asking about fitted values from `plm`). – joran Sep 16 '11 at 15:30
  • You could avoid having this be a duplicate by extracting a portion of your data and posting using dput() to create a working example. I will remove my vote to close if you do that. – IRTFM Sep 16 '11 at 17:32
  • A simple way to get the fitted values fitted.panelmodel <- plm(object, ...) object$model[[1]] - object$residuals There is currently no better method for that. – Andre Sep 16 '11 at 20:38

1 Answers1

1

A simple way to get the fitted values

 fitted.panelmodel <- plm(object, ...)
 object$model[[1]] - object$residuals

There is currently no better method for that.

Andre
  • 105
  • 2
  • 7