I have a csv file containing numeric results with a mixture of decimal precision (e.g. 23 47.1, 2.35)
When I import to Stata the integers are fine but the with the decimals the decimal precision changes thus: 5.1 becomes 5.0999999 and 0.95 becomes .94999999
The display format is fine. i.e. when I view the Stata dataset I see 5.1 as 5.1 but the underlying stored value contains the unwanted decimals.
This is important because when I export the data to my final destination format (SAS V9) the underlying result (5.0999999) is the one that I see in my SAS file.
Any ideas how I can stop this from happening?
I already tried importing the results as a string but when I destring them I get the same result! I've also tried using a do file to import both a csv and an excel file and I have tried using STAT Transfer with no luck.
When I import to Stata the integers are fine but the with the decimals the decimal precision changes thus: 5.1 becomes 5.0999999 and 0.95 becomes .94999999
The display format is fine. i.e. when I view the Stata dataset I see 5.1 as 5.1 but the underlying stored value contains the unwanted decimals.
This is important because when I export the data to my final destination format (SAS V9) the underlying result (5.0999999) is the one that I see in my SAS file.
Any ideas how I can stop this from happening?
I already tried importing the results as a string but when I destring them I get the same result! I've also tried using a do file to import both a csv and an excel file and I have tried using STAT Transfer with no luck.
Comment