I have two datafiles and I am trying to merge them using an identification variable called HHID. In the first file the identification variable HHID is saved as double %8.0g .
When I try to merge these two files several of the observations are not merged despite the identification variable HHID having the same value.
When I check in the browser window i notice that in the first file all values of the identifier variable HHID are rounded up to one decimal point. However, in my second file the identification variable HHID is rounded up to one decimal point but it is 'saved' as up to 10 decimal points. For example, a value of HHID shows as 3.1 but it is saved as 3.0999999943.
This may be the reason I am not able to merge many observations in my data files.
I would appreciate any suggestion on how to converting the HHID variable into 1 decimal point to merge my data.
When I try to merge these two files several of the observations are not merged despite the identification variable HHID having the same value.
When I check in the browser window i notice that in the first file all values of the identifier variable HHID are rounded up to one decimal point. However, in my second file the identification variable HHID is rounded up to one decimal point but it is 'saved' as up to 10 decimal points. For example, a value of HHID shows as 3.1 but it is saved as 3.0999999943.
This may be the reason I am not able to merge many observations in my data files.
I would appreciate any suggestion on how to converting the HHID variable into 1 decimal point to merge my data.
Comment