Random effects estimation error with plm package due to negative variance

筅森魡賤 提交于 2019-12-11 08:55:32

问题


I'm trying to estimate a panel data model with random effects Swamy and Ahora transformation on market share data of tourism destinations. Please, find attached the dataset in https://github.com/Joseperles/Statistical-questions

The model is estimated according the following code:

random<-plm(ld_Share~ld_Gdp+ld_Gdppc+ld_Gkf+ld_Cpi+ld_Fdi+ld_Exrate,
 data=Panel, index=c("Country", "obs"), model="random")

However I get this error message:

Error in swar(object, data, effect) : the estimated variance of the individual effect is negative

However, when I use Gretl, Eviews or Stata to compare, I get an estimation for this model (the same output in all of them based on GLS estimation). (Please, find the output from this econometric packages at the same web adress).

With fixed effect or pooled ols I also get the same estimations with plm and all other softwares.

Somebody knows what could be the problem and if there is a possbility to reproduce this output of eviews or stata for the random model (the same estimation procedure) with the plm R-package?

Thanks in advance and sorry for any inconvenience.

来源:https://stackoverflow.com/questions/31050744/random-effects-estimation-error-with-plm-package-due-to-negative-variance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!