My post follows after the one below, which remains unanswered.
In R - How to use spml objects in Stargazer
Since stargazer does not work with splm models, I tried texreg, as suggested in the post above. basically these is what I do:
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)
then I apply texreg to get a nice table results output for my paper
texreg(list(m, m2), dcolumn = TRUE, booktabs = TRUE,use.packages = FALSE, label = "tab:3", caption = "Two spatial models.",float.pos = "hb!")
however, i get the error below:
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘extract’ for signature ‘"splm"’
>
How can I make (extract) texreg
applicable to spatial panel models, or splm
models?
I hope I can get some help..