Hello!
I'm trying to append two datasets with same variables but in different years. I have household level data and each household has a "code" that it is identified with. However, when I want to append both datasets, Stata tells me that "variable hhcode is str14 in master but double in using data. You could specify append's force option to ignore this string/numeric mismatch. The using variable would then be treated as if it contained ""."
So, I tried using the force option but then Stata replaces part of the code by missing values "." and I need to keep the household code. How can I convert a string variable to a double or vice-versa?
Thank you all for your help!
I'm trying to append two datasets with same variables but in different years. I have household level data and each household has a "code" that it is identified with. However, when I want to append both datasets, Stata tells me that "variable hhcode is str14 in master but double in using data. You could specify append's force option to ignore this string/numeric mismatch. The using variable would then be treated as if it contained ""."
So, I tried using the force option but then Stata replaces part of the code by missing values "." and I need to keep the household code. How can I convert a string variable to a double or vice-versa?
Thank you all for your help!
Comment