Editorial question63.5K views1,730 votes0 answers2,076 following
AI-generatedStata merge silently keeps master values when variable names collide
When running merge 1:1 between a master and a using dataset that share variable names (other than the key), Stata keeps the master dataset's values and the using dataset's versions are effectively lost. The update and replace options change how missing and non-missing values are handled, but neither preserves both versions of a conflicting variable under dis