ycroissant / plm

Panel Data Econometrics with R
GNU General Public License v2.0
49 stars 13 forks source link

predict.plm for fd models #52

Open warnes opened 10 months ago

warnes commented 10 months ago

Currently predict.plm for "fd" models appears to be returning first difference predictions, rather than predictions on the original scale.

It would be helpful if there was an option ( default?) to return the values on the original scale, as well as support for 'se.fit' and 'interval' arguments like predict.lm.

tappek commented 4 months ago

Good comment, thank you!

  # NB (TODO?): for between and FD models: output is of different length for 
  #     newdata = NULL (output is compressed data) and for 
  #     newdata = original pdata.frame (output has original length)

Regards the scale, I have this comment in the code for between and FD models. And should maybe make this clear in the documentation. Is setting newdata = <your_original_pdata.frame> giving you what you expect?