简体   繁体   English

Zelig Probitgee的观星台

[英]Stargazer Table from Zelig Probitgee

I have (successfully) run a probitgee with clustered SEs in Zelig and want to get the output in a stargazer table. 我已经(成功地)在Zelig中使用带有集群SE的probitgee,并希望在观星台中获得输出。

mod1z <- zprobitgee$new()
mod1z$zelig(formula = dv ~ var1 + var2 +var3, id = "clusterid", data = df)

For stargazer, I use the following 对于观星者,我使用以下内容

mod1zf <- from_zelig_model(mod1z)
stargazer(mod1zf, type = "html", out = "table.html")

I get the error: 我收到错误:

% Error: Unrecognized object type.

I attempted to run it with a Zelig linear model, and it works: 我尝试使用Zelig线性模型运行它,并且可以正常工作:

modlinear <- zls$new()
modlinear$zelig(formula = dv ~ var1 + var2 + var3, data = df)
modlinearf <- from_zelig_model(mod1z)
stargazer(mod1linearf, type = "html", out = "table.html")

The above yields a table of regression coefficients and SEs. 上面产生了回归系数和SE的表。

How can I get Zelig probitgee to work with Stargazer? 我该如何让Zelig probitgee与Stargazer合作?

You have to access the zelig.out model object. 您必须访问zelig.out模型对象。 Type this into your console to see what it gives you: 在控制台中键入以下内容,以查看它为您提供了什么:

la$zelig.out$z.out[[1]]

So your command will look like this: 因此,您的命令将如下所示:

stargazer(lm(la$zelig.out$z.out[[1]], type = "html", out = "table.html")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM