Error: Internal error regarding the lengths of vectors of coefficients in R

Error: Internal error regarding the lengths of vectors of coefficients in R

我正在尝试为回归构建系数图

est_bidders = feols(applied_participants ~ treatment_group::qt('18/02') | fe1 + fe2 + fe3, data)

coefplot(est_bidders)

我收到一个奇怪的错误:Error in coefplot_prms(object = object, ..., sd = sd, ci_low = ci_low, : Internal error regarding the lengths of vectors of coefficients

我实际上不明白它的意思以及如何更正它。当我 运行 对其他结果变量进行相同的回归时,它工作正常,最后我得到了想要的图表。应该是和变量本身有关吧(基本都是1到86之间的数字)

更新。根据下面的评论,我提供了一些 dput() 用于复制:

> dput(subset[1:15,])

structure(list(applied_participants = c(1L, 2L, 2L, 5L, 3L, 1L, 2L, 14L, 2L, 3L, 1L, 7L, 2L, 1L, 1L), treatment_group = c(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0), qt = c("16/01", "16/02", "16/02", "16/02", "16/02", "16/02", "16/02", "16/02", "16/02", "16/03", "16/03", "16/03", "16/03", "16/03", "16/03"), good_class = c("27", "17", "22", "20", "43", "10", "45", "27", "43", "26", "22", "26", "26", "26", "26"), customerrequirement_customer_regnum = c("01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073", "01012000073"), year_month = c("2016-02", "2016-04", "2016-04", "2016-04", "2016-04", "2016-04", "2016-05", "2016-06", "2016-06", "2016-07", "2016-07", "2016-08", "2016-08", "2016-09", "2016-09")), row.names = c(NA, -15L), .internal.selfref = <pointer: 0x0000000002551ef0>, class = c("data.table", "data.frame"))

我正在使用以下库来计算我的回归和绘图系数:

install.packages('fixest')
library(fixest)

在具有这些确切变量的情况下,我正在 运行 进行回归:

est_bidders = feols(applied_participants ~ treatment_group::qt('18/02') | good_class + customerrequirement_customer_regnum + year_month, subset)

回归似乎工作正常,但 coefplot 不适用于命名错误 coefplot(est_bidders)

fixest作者在这里。一些评论:

  • treatment_group::qt('18/02') 实际上是 shorthand for interact(treatment_group, qt, ref = "18/02")variable::interaction 语法是高度非标准的 R,我引入它是因为我觉得它很方便,但对于不熟悉它的人来说非常混乱(尤其是在上面的示例中 variable name qt 也是一个R函数...)
  • 您发现了一个内部错误。您遇到的错误应该 永远不会 发生,所以有些事情我没有发现。你能用一个最小的工作示例在 https://github.com/lrberge/fixest/issues 上创建一个问题吗?或者只是给我发一封电子邮件?我会在下次更新包时更正它。