我的帖子在下面的帖子之后,仍然没有答案。
In R - How to use spml objects in Stargazer
由于stargazer不适用于splm模型,我试过texreg,如上面的帖子所示。基本上这就是我所做的:
library(spdep)
library(texreg)
fm<-Y ~ x+m+s+slag(x,listw=w.listw) #formula to be applied
#Model1- 1st Spatial RE model
m1 <- spml(formula=fm, data = spatialpaneldata,listw = w.listw, model="random", spatial.error="b", lag=T)
#Model2 - 2nd Spatial RE model
m2<- spml(formula=fm, data = spatialpaneldata,listw = w.listw, model="random", spatial.error = "kkp", lag=T)
然后我应用texreg为我的论文获得一个很好的表结果输出
texreg(list(m, m2), dcolumn = TRUE, booktabs = TRUE,use.packages = FALSE, label = "tab:3", caption = "Two spatial models.",float.pos = "hb!")
然而,我得到以下错误:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘extract’ for signature ‘"splm"’
>
如何制作(提取)texreg
适用于空间面板模型或splm
模型?
我希望能得到一些帮助..