Home首页 · Causal因果 · Matching匹配

Lab · Matching匹配实验 · 匹配

Which students remain once prior math is similar?先前数学相近之后,还剩下谁?

A department head has 80 students and has to decide whether to keep paying for an optional statistics workshop. The sheet has three columns: joined or not, a prior-math score, and the later methods grade. Students with higher prior math signed up more often, so a higher grade among joiners can be that earlier score. Matching pairs a joiner with a non-joiner only when their prior-math scores sit inside the caliper. Students with no such partner drop out of the comparison.一位系主任有 80 名学生,要决定选修的统计工作坊还要不要继续付钱。表上三列:参加与否、先前的数学分数、后来的方法课成绩。先前数学更高的学生更常报名,所以参加者成绩更好,可能只是那个旧分数。匹配只在两人的先前数学落在卡尺里时,才把参加者和未参加者配成一对。找不到这样的人,就不进入比较。

Why this matters.为何重要。 A higher methods grade among joiners can be their higher prior math, not the workshop. Pairing keeps a joiner only when a non-joiner has a similar prior-math score. Students with no partner drop out of the grade gap the dean would see.参加者方法课成绩更高,可以是他们先前的数学更高,不是工作坊。配对只在未参加者也有相近的先前数学时才留下参加者。没有伙伴的学生,不进入院长会看到的成绩差距。

Try this试一试 Turn up how strongly prior math pushes joining, and keep the allowed gap wide. Compare the grade gap before pairing with the workshop’s own effect. Then tighten the gap and see who fades out.把先前数学推动报名的力度调高,允许的差距先留宽。把配对前的成绩差和工作坊本身的作用比一比。再把差距收紧,看谁变淡。

80 units · faded marks have no match. X is not a real person’s record.80 个单位 · 淡色标记没有配对。X 不是真人的记录。

Circles: joined the workshop. Squares: did not. A line joins two students whose prior math is close enough. Faded marks had no partner.圆:参加了工作坊。方:没参加。线连接先前数学足够接近的两名学生。淡色标记没有伙伴。

Read the chart读这张图

If you misread this读错了会怎样

If the department head tells the dean the matched grade gap means the workshop worked, the dean may keep paying for it. A tight caliper has already dropped students who had no partner with a similar prior-math score. The gap is only among students who could be paired.如果系主任告诉院长,配对后的成绩差距表示工作坊有效,院长可能会继续付钱。卡尺一紧,找不到先前数学接近的伙伴的学生已经被丢掉。这个差距只存在于能够配成对的学生之间。

Enough, and not enough够用,以及不够

Enough to see that tightening the allowed gap in prior math changes which of the 80 students remain in the grade comparison.够用来看见:把先前数学允许的差距收紧,会改变 80 名学生里谁还留在成绩比较中。

Not enough for a memo that keeps the workshop. It still has to match on more than prior math, and say which students the tight rule left out of the grade gap.不够写一份留下工作坊的说明。说明仍要匹配先前数学以外的列,并写明严格规则把哪些学生留在了成绩差距之外。

Seed 42
Equations, assumptions, and limits方程、假设与限度

Current equation当前方程

X is standard normal. The propensity is logistic(γX), and treatment is a Bernoulli draw from it. The outcome is Y = τT + X + 0.5e, with e standard normal and independent. The coefficient on X is fixed at 1, so a one-unit gap in mean X shifts the naive contrast by about one unit.X 是标准正态。倾向得分是 logistic(γX),处理是由此做的伯努利抽取。结果是 Y = τT + X + 0.5e,e 为独立的标准正态。X 的系数固定为 1,所以平均 X 差一个单位,朴素对比大约也移动一个单位。

The naive contrast is the difference in mean Y. Matching is greedy and one to one, without replacement. Treated units are considered in order of |X|, largest first, and each takes the nearest unused control inside the caliper. There is only one covariate, so matching on X and matching on the propensity put units in the same order.朴素对比是平均 Y 之差。匹配是贪心的一一匹配,不放回。处理单位按 |X| 从大到小考虑,各自取卡尺内最近的未用对照。只有一个协变量,所以按 X 匹配和按倾向得分匹配,单位顺序相同。

Common pitfall.常见陷阱。 A tight caliper can make the covariate gap small and still answer a different question: the contrast among treated units who had a nearby control. The unmatched treated units are not in that average. Another pitfall is to treat balance on X as balance on everything. If some other factor differs between treated and control, this picture will not show it. The lab also does not reweight by the inverse propensity. It only pairs neighbors.紧的卡尺可以让协变量差距变小,同时回答另一个问题:在附近有对照的那些处理单位之间的对比。没配上的处理单位不在这个平均里。另一个陷阱是把 X 上的平衡当成一切都平衡。若处理组和对照组在别的因素上不同,这张图不会显示。实验也不按倾向得分的倒数再加权。它只配对邻居。

Books behind this lab are named on the本实验背后的书按主题列在About关于.