Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export splm object #50

Open
alexmufeq opened this issue Aug 16, 2022 · 1 comment
Open

Export splm object #50

alexmufeq opened this issue Aug 16, 2022 · 1 comment

Comments

@alexmufeq
Copy link

Hi! I'm trying to export an splm regression, because I saw here that is possible. But I have an error:

Error in table2spreadsheet(..., type = "XLS") : splm is currently not supported by table2office

Is there still a way to export a splm object?

Here is the code:

library(splm)
library(export)

#loading data
data(Insurance)
data(itaww)

# preparing regression
w <- mat2listw(itaww)
reg <- log(ppcd) ~ log(rgdp) + log(bank) + log(den) + rirs +
  log(agen) + school + vaagr + log(fam) + d99 + d00 +
  d01 + d02 

# splm reg

splm_reg <- spml(reg, data = Insurance, listw =w, model="pooling", spatial.error="none",  lag=FALSE)

#exporting splm regression
table2excel(splm_reg, file=filen, sheetName="x", digits = 1, digitspvals = 3)

@tomwenseleers
Copy link
Owner

Sorry it seems that xtable, which export depends on, dropped support for a bunch of models & there is also no tidy method for splm objects. Best to ask the authors of either xtable or broom about that to see if they would mind supporting splm objects once more...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants