Hello
This is a conceptual question. I have a dataset running into 6000 household ids some of which are in the form 10.1 or 10.2. I had to drop the obs with the decimals above 1 and convert the remaining into integers (say, 10.1 to 10)
In order to append the data with same dataset from another year, I need the household ids in integers and not decimals. I tried rounding off 10.1 to 10 which did not work.
replace hhid =round(hhid, 0.0) (cue taken from a previous statalist query) However, this did not work. I changed the data type of household id from double to int which serves my purpose but I am not sure how right is that. The household ids don't go beyond 6000 so I don't think I am losing precision here. I have read Stata's help section on data_types but my doubt remains. Please correct me where I am wrong. Thanks Smriti