I have been merging some files lately and discovered that _merge_
fails to match observations when the key-variables have different
precision.
If the key variable is measured as long in one file and float in the
other, most of my valid matches fail. _merge_ does tell me that the
key variable has been recast to a double, but I do feel that _merge_
should warn the user of potential false mismatches due to different
precision. If I make sure the key is stored as long in both files the
matches are correct.
I should mention that the key-variable I am using is a 9-digit
integer. I feel that this behaviour may be linked to the scale of the
key-variable.
Am I missing something here?
This is an often made mistake, and the answer lies in the last paragraph's
mentioning of a 9-digit variable. Precision in the standard float-datatype
is limited to 8 digits, therefor when one creates identifying variables
such as respondent numbers, always be sure to create these in the
long-datatype (see -help datatype- for more info) or maybe even as string
variables.