nuomaniya 发表于 2013-1-17 15:39 
如果GROUP 下面还有SUBGROUP(也是字符型,比如a1-a3)应当如何处理呢?如果GROUP包含缺失值会导致什么错误呢 ...
add one more condition for the subgroup as we did for group.
Missing group values in set B are misleading here because we don't know which groups in A should be matched. I would delete the missing group from B before matching or conditionally excute the code for missing goup. For example,
The consequence of including missing groups in our code is, since we are sampling without replacement, we reset the matched group in A as missing after one match in order to prevent from next match and thus the reset missing could be mixed with the original missing.
Jingju