繁体   English   中英

这是什么原因造成的? R 中的 rdplot 错误:seq.default(x_min, c, jump_l) 中的错误:无效 '(to - from)/by'

[英]What causes this? rdplot Error in R: Error in seq.default(x_min, c, jump_l) : invalid '(to - from)/by'

我试图在 rdplot 中使用一些非常简单的数据,但我不断收到错误: Error in seq.default(x_min, c, jump_l) : invalid '(to - from)/by'我发现这个响应来自不同的帖子Stack Overflow 但似乎可以将修复程序应用于 rdplot 函数。 有谁知道如何解决这个问题? 我使用的实际代码是:

library(rdrobust)

rdplot(y = dt$treated, x = dt$score)

再现性: 是我的数据样本,正如我所说,这是相当常见的数据。 到目前为止,我发现了几件事:

  1. 观察的多个子集似乎引起了问题

  2. 从默认值更改nbinsbinselect参数将解决问题

  3. 第一次出现错误是在集合 1:1463 上,但是仅使用观测值 2:1464 就可以了。

最近的 rdrobust 版本 1.0.1 应该处理这个错误。

暂无
暂无

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

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