0

I tried to do fixed effect model using plm and lm + factor(countries). And I got the same values for estimators, but I got different values for R2, residual standard error and F-statistic. Why?

And the second question - can I get the coefficients for countries using the plm? (similar to lm + factor(countries))

Here is my data set: https://www.dropbox.com/s/a8r0vl85rb1ak6e/panel_data.csv?dl=0 There are some financial measures and GDP growth for some countries and several years. There are some NAN's (panel in unbalanced)

proba<-read_excel("my_data.xlsx")

pdata<-pdata.frame(proba,index=c("id","year"))

fixed <-plm(GDP_growth~gfdddi01 + gfdddi02 + gfdddi04 + gfdddi05,data=pdata,model="within")

fixed.dum <-lm(GDP_growth~gfdddi01 + gfdddi02 + gfdddi04 + gfdddi05 + factor(country) - 1, data=pdata_srednie_5_letnie)

Thank you!

Sylwia
  • 3
  • 1
  • 'lm()` gives the standard value for r-squared for the OLS model, while `plm(model = "within")` reports the "within" r-squared for the demeaned model. If you want more info, I'd asked this over on [Cross-Validated](https://stats.stackexchange.com) – paqmo Apr 10 '20 at 13:44
  • Both questions have been asked before, please see here for answers: https://stackoverflow.com/questions/49058092/plm-vs-lm-different-results – Helix123 Apr 11 '20 at 07:35

0 Answers0