“variable _merge already defined”错误表明你尝试定义或修改一个名为_merge的变量,但该变量已经存在于你的数据集中。_merge是一个特殊的变量,通常由Stata在数据合并(merge)操作中自动生成,用于标识观测值在合并过程中的匹配状态。 2. 指出可能导致该错误的情况 这个错误通常发生在以下几种情况: 重复合并操作:如果...
[第一个变量名即为前面sort后面的变量名,文件名是辅助数据库的名字,后面的变量名是希望提取的变量名] ta _merge [显示_merge的取值情况。_merge等于1的观察是仅主库有的,等于2的是仅辅助库有的,等于3是两个库都有的。] drop if _merge==2 [删除仅仅来自辅助库的观察] drop merge [删除_merge] save (...
Subject: st: merge command when variable already defined I have a variable that contains values for most of my dataset. I would like to add values where it is presently undefined by match merging with another dataset. However, this does not work since the variable is already defined. The on...