【问题标题】:replicate stargazer output like for linear models with spatial models复制 stargazer 输出,如具有空间模型的线性模型
【发布时间】:2020-07-05 07:27:57
【问题描述】:

我正在尝试为不受 stargazer 支持的模型重现漂亮的 stargazer 模型 (lm) 输出。

线性模型观星器输出可以手工制作吗?因为我们可以从每个模型中创建一个数据框,然后将创建的数据框插入到 stargazer:



library(spdep)

data(afcon, package="spData")

afcon$Y = rnorm(42, 50, 20)

cns <- knearneigh(cbind(afcon$x, afcon$y), k=7, longlat=T)
scnsn <- knn2nb(cns, row.names = NULL, sym = T)
W <- nb2listw(scnsn, zero.policy = TRUE)

ols <- lm(totcon ~ Y, data = afcon)

spatial.lag <- lagsarlm(totcon ~ Y, data = afcon, W)
summary(model)

stargazer(ols, type = "text")


summary(spatial.lag)
data.frame(
  spatial.lag$coefficients,
  spatial.lag$rest.se
) %>%
  rename(coeffs = spatial.lag.coefficients, 
         se = spatial.lag.rest.se) %>% 
  stargazer(type = "text", summary = F)

当我们stargazer(ols) 输出非常好时,我想手动为spatial.lag 重现相同的输出有没有办法做到这一点,如何上标等...

【问题讨论】:

    标签: dataframe latex stargazer


    【解决方案1】:

    你是说^{*}?如果是这样,在观星者中是不可能的!我已经尝试过了,所以我建议您像检查 here 一样检查 xtable 包。

    【讨论】:

      猜你喜欢
      • 2021-12-20
      • 1970-01-01
      • 2021-05-27
      • 2017-09-06
      • 2023-03-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-22
      相关资源
      最近更新 更多