Hi Statalisters,

I'm currently working with the 2019 CPS ASEC, trying to match individual respondents to their respective households. I'm having trouble, however, because the household and individual ID values are relatively long (20 and 22 digits, respectively). This means that I can't store these values as doubles without losing precision. I know that I could save them as strings (since I'm not performing computations on the values), but since the variables are read-in from the original csv as numeric rather than string, hasn't the precision already been lost before I work with the data in Stata? I have a feeling this is the case because the household IDs I'm getting are not uniquely identifying the households.

For reference, my code for first trying to re-format the household ID looks like this:

Code:
import delimited "`path'/2019_csv_raw/hhpub19.csv", clear

tostring(h_idnum), replace format(%020.0f)

Any help would be much appreciated - thanks!