【问题标题】:Coarsened Exact Matching粗化精确匹配
【发布时间】:2016-04-13 03:44:11
【问题描述】:

我正在尝试对包含 6549 个观测值和 94 个变量的数据集运行粗化精确匹配。我已经消除了 NA,并且正在“Polity2>/7”(治疗)上运行匹配。但是,当我开始运行命令时,我遇到了以下错误消息:

mat<-cem(treatment="Polity2>=7",data = Matched2a, drop = "todrop")
Error in names(obj$group.idx) <- paste("G", obj$g.names, sep = "") : 

'names' attribute [1] must be the same length as the vector [0]

In addition: Warning messages:
1: In reduce.var(data[[i]], cutpoints[[vnames[i]]]) :
  NAs introduced by coercion
2: In reduce.var(data[[i]], cutpoints[[vnames[i]]]) :
  NAs introduced by coercion

有人可以向我解释这些错误消息的含义吗?

【问题讨论】:

标签: r matching na


【解决方案1】:

确保将处理变量列添加到数据中。

【讨论】:

    猜你喜欢
    • 2021-10-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-30
    • 1970-01-01
    • 2018-06-09
    相关资源
    最近更新 更多