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
Related Posts with Rounding off or changing data type for household id
Estimation problemsHello dear Stata netizens. I am a PhD student in economics. The tests carried out revealed the prese…
xtlogit does not converge (not concave)Dear Statalist I'm having difficulties trying estimate the following model working with panel data …
how to use color to differentiate the two groups? Code: set scheme s2mono * Example generated by -dataex-. To install: ssc install dataex clear inp…
Help with changing reference category when doing a cox regressionHello, I am doing a cox regression and have a variable socioeconomic status 'ses' which I have label…
ssc cortestiI was wondering if any others agree that the Williams test implemented in the SSC program cortesti m…
Subscribe to:
Post Comments (Atom)
0 Response to Rounding off or changing data type for household id
Post a Comment