是否可以在观星者中添加自定义列?

时间:2016-08-01 08:28:21

标签: r stargazer

我想在我的变量名称中添加一个额外的列,以便我可以识别标签所指的确切参数。我意识到我不需要添加自定义列,但我认为如果可以,它会更好。优选地,自定义列将具有标题" Paremeters",在型号的左侧。这可能吗?这里有一些基线代码:

library(stargazer)
data <- stargazer(attitude)
linear.1 <- lm(rating ~ complaints + privileges + learning
              + raises + critical, data=attitude)
linear.2 <- lm(rating ~ complaints + privileges + learning, data=attitude)
stargazer(linear.1, linear.2, type = "text",
          column.labels = c("model 1", "model 2"),
          covariate.labels = c("Complaints ($\\alpha$)",
                               "Privileges ($\\beta$)",
                               "Learning ($\\gamma$)",
                               "Raises ($\\delta$)",
                               "Critical ($\\epsilon$)",
                               "Intercept"
          ))

理想情况下,我希望有这样的东西:

1 个答案:

答案 0 :(得分:0)

使用stargazer(output, output2, type = "html", add.lines = list(c("Fixed effects?", "No", "No"),c("Results believable?", "Maybe", "Try again later"))) (参考文档)

 var result = yourDatatable
      .GroupBy(e => e.AssignedTo)
      .ToList()
      .Select(eg => new
      {
          AssignedTo = eg.Key,
          CompletedSum = eg.Sum(p=>p.completed),
          EfforSum = eg.Sum(p=>p.effort),
          StoryIds = string.Join(",", eg.Select(i => i.storyid))
      });

您还可以查看链接According to this SO post